Skip to content

Preserve body parameter name via the vendor extension #966

Closed

Description

@wing328

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

Activity

  1. blast-hardcheese commented on Jul 24, 2019

    @blast-hardcheese
    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.

  2. gracekarina commented on Sep 10, 2019

    @gracekarina
    Contributor

    closed by #967

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions