We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#74
A responses object with a Specification Extension with the type null will throw and error
Cannot read property 'headers' of null
You can see here that responses should be extendable https://swagger.io/specification/#responsesObject
h2. Test Example responses object
"responses": { "x-an-extension-null": null, "200": {} }
'response' will evaluate to null here: /~https://github.com/BigstickCarpet/swagger-parser/blob/master/lib/validate-spec.js#L49 And throw the error here for trying to access null.headers /~https://github.com/BigstickCarpet/swagger-parser/blob/master/lib/validate-spec.js#L251
Suggest either filtering extensions or null safe access of headers.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue and submitting a PR. I've merged your changes, and they should be published to npm within the next few days
Sorry, something went wrong.
No branches or pull requests
#74
A responses object with a Specification Extension with the type null will throw and error
You can see here that responses should be extendable
https://swagger.io/specification/#responsesObject
h2. Test
Example responses object
'response' will evaluate to null here:
/~https://github.com/BigstickCarpet/swagger-parser/blob/master/lib/validate-spec.js#L49
And throw the error here for trying to access null.headers
/~https://github.com/BigstickCarpet/swagger-parser/blob/master/lib/validate-spec.js#L251
Suggest either filtering extensions or null safe access of headers.
The text was updated successfully, but these errors were encountered: