Skip to content

Fix requestBody not wrapped in a schema in OpenAPI #6565

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

Merged
merged 3 commits into from
Apr 4, 2019
Merged

Fix requestBody not wrapped in a schema in OpenAPI #6565

merged 3 commits into from
Apr 4, 2019

Conversation

Lucidiot
Copy link
Contributor

@Lucidiot Lucidiot commented Apr 4, 2019

Fixes #6562, on the OpenAPI generation PR #6532 by @carltongibson: wraps schemas in the requestBody property on an operation in a schema key.

requestBody:
  content:
    application/json:
      schema:
        properties: ...
        required: ...

Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

Hi @Lucidiot. Thanks for this.

Does the exact same not apply to responses too? (Will check now...)

Assuming so, can you add? (If not, say, I can do it!)

@Lucidiot
Copy link
Contributor Author

Lucidiot commented Apr 4, 2019

It seems so and I added it :)

@carltongibson
Copy link
Collaborator

Super. Thanks.

@carltongibson carltongibson merged commit ac64c0a into encode:openapi-schema-generation Apr 4, 2019
@Lucidiot Lucidiot deleted the fix-request-body branch April 8, 2019 08:15
carltongibson pushed a commit that referenced this pull request Apr 29, 2019
* Wrap requestBody contents in JSON schemas

* Update unit test

* Wrap response schemas in a schema object
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