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

[feature]: OpenAPI 3.1 import: Support DELETE with request body #4034

Open
1 task done
xiic opened this issue May 3, 2024 · 0 comments
Open
1 task done

[feature]: OpenAPI 3.1 import: Support DELETE with request body #4034

xiic opened this issue May 3, 2024 · 0 comments
Labels
feature New feature or request

Comments

@xiic
Copy link

xiic commented May 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Add support for OpenAPI 3.1

Why should this be worked on?

Starting with OpenAPI 3.1, it is allowed, although discouraged, to have a request body for GET/HEAD/DELETE requests (see OAI/OpenAPI-Specification#2117). Maybe there are other things regarding OpenAPI 3.1 as well.

Currently it complains that the definition is invalid. This is an (valid) example for an OpenAPI 3.1.0 spec:

openapi: 3.1.0
info:
  title: Testapi
  version: 1.0.0
paths:
  /api/dummy:
    delete:
      description: delete with body
      responses:
        '204':
          description: Success, No content
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mydto'
components:
  schemas:
    mydto:
      description: testobject
      required:
        - test
      type: object
      properties:
        test:
          type: string
@xiic xiic added the feature New feature or request label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant