Skip to content

Commit

Permalink
Implemented RFC0010
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Dec 14, 2015
1 parent a652d88 commit afd2b20
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Changelog
All notable changes to the Refract project will be documented in this file.

## [0.6.0] - 2015-12-15

### Breaking

#### API Description Namespace
- Changed `href` in HTTP Request Message from type `Href` to `Templated Href`
- Added `hrefVariables` as an attribute to HTTP Request Message.

#### Parse Result Namespace
- Added Origin Link Relation
- Added Inferred Link Relation

## [0.4.0] - 2015-08-15

### Breaking
Expand Down Expand Up @@ -45,6 +57,7 @@ All notable changes to the Refract project will be documented in this file.
[0.4.0]: https://github.com/refractproject/refract-spec/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/refractproject/refract-spec/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/refractproject/refract-spec/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/refractproject/refract-spec/tree/v0.1.0

[RFC 0004]: https://github.com/refractproject/rfcs/blob/master/text/0004-clarify-api-namespace.md
[RFC 0003]: https://github.com/refractproject/rfcs/blob/master/text/0003-class-rename.md
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Refract is a recursive data structure for expressing complex structures, relatio

## Version

**Current Version**: 0.5.0
**Current Version**: 0.6.0

**Note**: This specification is currently in development and may change before getting to a more stable 1.0 version. Please be mindful of this if using this production environments.

Expand Down
36 changes: 33 additions & 3 deletions namespaces/api-description-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Note: At the moment only the HTTP protocol is supported.
- `href` (Templated Href) - The URI template for this transition.

If present, the value of the `href` attribute SHOULD be used to resolve
target URI of the transition.
the target URI of the transition.

If not set, the parent `resource` element `href` attribute SHOULD be
used to resolve the target URI of the transition.
Expand Down Expand Up @@ -370,7 +370,21 @@ message pair. A transaction example MUST contain exactly one HTTP request and on
"element": "httpRequest",
"attributes": {
"method": "GET",
"href": "https://polls.apiblueprint.org/questions/1"
"href": "/questions/{question_id}",
"hrefVariables": {
"element": "hrefVariables",
"content": [
{
"element": "member",
"content": {
"key": {
"element": "string",
"content": "question_id"
}
}
}
]
}
},
"content": []
},
Expand Down Expand Up @@ -458,7 +472,23 @@ HTTP request message.
- `element`: httpRequest (string, fixed)
- `attributes`
- `method` (string) - HTTP request method. The method value SHOULD be inherited from a parent transition if it is unset.
- `href` (Href) - A concrete URI for the request. The href SHOULD be inherited from a parent transition by expanding the href and hrefVariables if unset.
- `href` (Templated Href) - URI Template for this HTTP request.

If present, the value of the `href` attribute SHOULD be used to resolve
the target URI of the http request.

If not set, the `href` attribute which was used to resolve the target
URI of the parent transition SHOULD be used to resolve the URI of
the http request.

- `hrefVariables` (Href Variables) - Input parameters

Definition of any input URI path segments or URI query parameters for this transition.

If `href` and `hrefVariables` attributes aren't set, the `hrefVariables` attribute
which was used to resolve the input parameters of the parent transition SHOULD
be used to resolve the http request input parameters.


### HTTP Response Message (HTTP Message Payload)

Expand Down

0 comments on commit afd2b20

Please sign in to comment.