Flavour related resources of Mealstrom API
A collection of flavours
-
Model
HAL + JSON representation of flavour resource
-
Body (application/hal+json)
[{ "_links": { "self": { "href": "/flavours/10000000-0000-0000-0000-000000000000" } }, "id": "10000000-0000-0000-0000-000000000000", "label": "sweet" }]
-
- Response 200 [Flavour Collection][]
-
Request (application/json)
{ "label" : "sweet" }
-
Response 201
{ "_links": { "self": { "href": "/flavours/10000000-0000-0000-0000-000000000000" } }, "id": "10000000-0000-0000-0000-000000000000", "label": "sweet" }
-
Response 409
{ "message" : "A flavour with that label already exists" }
-
Model
-
Body (application/hal+json)
{ "_links": { "self": { "href": "/flavours/10000000-0000-0000-0000-000000000000" } }, "id": "10000000-0000-0000-0000-000000000000", "label": "sweet" }
-
Content-Type definition is per model, response or request (payload).
Therefore instead of
the whole model should be defined as of the
application/hal+json
type.Thus:
This will fix the problem. However it would be nice if the parser would report this. I have created an issue for this at apiaryio/snowcrash#65