Skip to content

Conversation

@mfn
Copy link
Contributor

@mfn mfn commented Oct 2, 2015

Per http://jsonapi.org/format/1.0/#errors 'status' and 'code' must be of
type string, if present.

For completeness I added casts for 'detail' and 'title' too, just in
case someone would pass an integer at a point.

This allows validating the response with e.g. http://jsonapi.org/faq/#is-there-a-json-schema-describing-json-api successfully.

Per http://jsonapi.org/format/1.0/#errors 'status' and 'code' must be of
type string, if present.

For completeness I added casts for 'detail' and 'title' too, just in
case someone would pass an integer at a point.
egeriis added a commit that referenced this pull request Oct 7, 2015
errors: ensure response matches jsonapi spec
@egeriis egeriis merged commit e6140db into egeriis:master Oct 7, 2015
@mfn mfn deleted the errors-spec branch October 7, 2015 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants