-
-
Notifications
You must be signed in to change notification settings - Fork 228
Support request bodies components #664
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
Support request bodies components #664
Conversation
Note – I probably won't have time to continue this for the next few weeks, would be happy if s/o else could pick up :) |
22fceac
to
c730b9f
Compare
c730b9f
to
87969ab
Compare
@dbanty I think it's complete now, would you mind to take a look? Disclaimer: I fixed the existing unit tests but did not write new ones especially for the new fetaure. To be honest I didn't really understand what how the tests work and what they actually test. ;-) |
Thank you for doing this, and sorry it took so long for me to get around to it. I ended up updating the other PR and finishing off, since there are soo many merge conflicts now (due to my delay). |
This PR was created by Knope. Merging it will create a new release ### Features #### Support request body refs You can now define and reuse bodies via refs, with a document like this: ```yaml paths: /something: post: requestBody: "$ref": "#/components/requestBodies/SharedBody" components: requestBodies: SharedBody: content: application/json: schema: type: string ``` Thanks to @kigawas and @supermihi for initial implementations and @RockyMM for the initial request. Closes #633, closes #664, resolves #595. ### Fixes - Indent of generated code for non-required lists. Thanks @sfowl! (#1050) - Parsing requestBody with $ref (#633) Co-authored-by: GitHub <github-actions@github.com>
This PR was created by Knope. Merging it will create a new release ### Features #### Support request body refs You can now define and reuse bodies via refs, with a document like this: ```yaml paths: /something: post: requestBody: "$ref": "#/components/requestBodies/SharedBody" components: requestBodies: SharedBody: content: application/json: schema: type: string ``` Thanks to @kigawas and @supermihi for initial implementations and @RockyMM for the initial request. Closes openapi-generators#633, closes openapi-generators#664, resolves openapi-generators#595. ### Fixes - Indent of generated code for non-required lists. Thanks @sfowl! (openapi-generators#1050) - Parsing requestBody with $ref (openapi-generators#633) Co-authored-by: GitHub <github-actions@github.com>
adds support for request bodies referencing to
components/requestBodies/<name>
(see spec)Fixes #595. Sorry I only found #633 after preparing this PR, but in contrast to #633 this one also updates tests (including e2e).