Skip to content

OpenAPI: GET, DELETE operations cannot have a requestBody #1010

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

Closed
dustinbyrne opened this issue Feb 8, 2023 · 2 comments · Fixed by #1022
Closed

OpenAPI: GET, DELETE operations cannot have a requestBody #1010

dustinbyrne opened this issue Feb 8, 2023 · 2 comments · Fixed by #1022
Assignees
Labels
bug Something isn't working openapi Related to OpenAPI document generation released

Comments

@dustinbyrne
Copy link
Contributor

dustinbyrne commented Feb 8, 2023

OpenAPI does not support requestBody within GET, DELETE methods because it does not have explicitly defined semantics.

See the following GitHub issue: OAI/OpenAPI-Specification#1801

The following generated definition is invalid:

  /api_keys/{id}:
    delete:
      responses:
        '302':
          content: {}
          description: Found
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                commit:
                  type: string
                utf8:
                  type: string
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
@kgilpin
Copy link
Contributor

kgilpin commented Feb 8, 2023 via email

@dustinbyrne dustinbyrne added openapi Related to OpenAPI document generation bug Something isn't working labels Feb 9, 2023
@dustinbyrne dustinbyrne changed the title OpenAPI: DELETE operations cannot have a requestBody OpenAPI: GET, DELETE operations cannot have a requestBody Feb 10, 2023
@dustinbyrne dustinbyrne self-assigned this Feb 13, 2023
@appland-release
Copy link
Contributor

🎉 This issue has been resolved in version @appland/openapi-v1.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working openapi Related to OpenAPI document generation released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants