Resource model is a resource manifestation. One particular representation of your resource.
Furthermore, in API Blueprint, any resource model
you have defined can be
referenced in a request or response section, saving you lots of time
maintaining your API blueprint. You simply define a resource model as any
payload (e.g. request
or response)
and then reference it later where you would normally write a request
or
response
.
Group of all messages-related resources.
At this point we will utilize our Message
resource model and reference it in
Response 200
.
This is the application/vnd.siren+json
message resource representation.
Headers | |
---|---|
Content-Type | application/vnd.siren+json |
Location | http://api.acme.com/message |
application/vnd.siren+json
{
"class": [ "message" ],
"properties": {
"message": "Hello World!"
},
"links": [
{ "rel": "self" , "href": "/message" }
]
}