Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

fix: updating the oas package to pull in some fixes for handling response schemas #461

Merged
merged 1 commit into from
Jan 28, 2020

Conversation

erunion
Copy link
Member

@erunion erunion commented Jan 28, 2020

This updates the oas package to do a few things:

  • Move core OAS-specific work from ResponseSchemaBody out of that and into the oas package.
  • Fix a bug in that code where if we encountered a response schema property, or $ref, that didn't have an explicit type property set, we wouldn't include it in the flattened output.

This PR doesn't add any unit tests because those tests have been added in the oas package instead. See readmeio/oas#104 for the PR that has this code migration, bug fix, and unit tests.

That said, here is a screenshot of the schema bug in action:

Screen Shot 2020-01-28 at 2 38 30 PM

And with the fix:

Screen Shot 2020-01-28 at 2 38 10 PM

See https://github.com/readmeio/oas/pull/104/files#diff-50da53e033459b1db3c580ac63f65edfR73-R88 for the full test case.

@erunion erunion added the type:bug Something isn't working label Jan 28, 2020
Copy link
Contributor

@rafegoldberg rafegoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎

looks good to me!

@erunion erunion merged commit 63539b9 into master Jan 28, 2020
@erunion erunion deleted the fix/ref-in-response-schemas branch January 28, 2020 22:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:bug Something isn't working
2 participants