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

Preserve body parameter name via the vendor extension #966

Closed
wing328 opened this issue Dec 18, 2018 · 2 comments
Closed

Preserve body parameter name via the vendor extension #966

wing328 opened this issue Dec 18, 2018 · 2 comments

Comments

@wing328
Copy link
Contributor

wing328 commented Dec 18, 2018

Consider the following OAS v2 spec, the body parameter name "body" is completely lost after parsing the spec:

      parameters:
        - in: body
          name: body
          description: Pet object that needs to be added to the store
          required: true
          schema:
            $ref: '#/definitions/Pet'

To preserve the body parameter name, we can store it in the vendor extension x-codegen-request-body-name

@blast-hardcheese
Copy link
Contributor

Just ran into this myself. Structurally, it's immaterial, as OpenAPI 3.x+ doesn't have names for body parameters. That being said, it does not offer a pleasant experience for users migrating to the new structure using the swagger converter module.

@gracekarina
Copy link
Contributor

closed by #967

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

No branches or pull requests

3 participants