Skip to content
New issue

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

Issue 73: ensure responses is populated with an object #74

Merged
merged 1 commit into from
Oct 15, 2017

Conversation

todanator
Copy link
Contributor

#73

This issue accounts for instances where there are extensions in the responses object and those extensions can be null.

@JamesMessinger
Copy link
Member

Good catch! Thanks for the PR!

@wickedest
Copy link

@BigstickCarpet , any chance of cutting a release?

@alasdairhurst
Copy link

alasdairhurst commented Oct 17, 2017

@todanator @BigstickCarpet Problem with the solution is that any keys inside the responses object will still be parsed/validated as responses if they are not null/undefined.
Extensions such as "x-foo" won't be ignored.

responses: {
   "x-foo": {
    "notaresponse": true
  },
  "200": {
  }
}

The same problem may also be seen in paths and parameters.

@JamesMessinger
Copy link
Member

Good point, @alasdairhurst . That's a separate issue though, since it applies to the all of the validation logic, not just the response validation. The validator should ignore x- properties everywhere.

@JamesMessinger
Copy link
Member

@wickedest - I just released v4.0.0, which includes this PR. Thanks again for the help!

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.

4 participants