interagent / committee

A collection of Rack middleware to support JSON Schema.
MIT License
883 stars 135 forks source link

README misdocuments default value for `parse_response_by_content_type` #391

Closed geemus closed 1 month ago

geemus commented 1 year ago

Looks like this may have changed as of 5.0.0. It previously defaulted to false, but now appears to default to true.

See:

https://github.com/interagent/committee/blob/f6748a5dd84af727c2ed1647b22f54aaa2f6b109/README.md?plain=1#L164

There also appear to be a few of defaulting related things to cleanup that look like: # TODO: delete when 5.0.0 released because default value changed

unicornzero commented 1 year ago

Thank you for reporting this! I'm setting up committee for the first time and your comment helped me get past an issue.

If someone else runs into difficulty with responses of Content-type "application/vnd.api+json", try updating your Committee::Middleware::ResponseValidation options to include parse_response_by_content_type: false

Example error in case someone searches for this:

Committee::InvalidResponse:
       #/components/responses/foobar/content/application~1vnd.api+json/schema expected object, but received String: "{\"data\":{\"type\":\"