FORMAT: 1A
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.
-
Model (application/vnd.siren+json)
This is the
application/vnd.siren+json
message resource representation.-
Headers
Location: http://api.acme.com/message
-
Body
{ "class": [ "message" ], "properties": { "message": "Hello World!" }, "links": [ { "rel": "self" , "href": "/message" } ] }
-
At this point we will utilize our Message
resource model and reference it in Response 200
.
-
Response 200
[My Message][]
-
Request Update Plain Text Message (text/plain)
All your base are belong to us.
-
Request Update JSON Message (application/json)
{ "message": "All your base are belong to us." }
-
Response 204