[GH-ISSUE #4034] [feature]: OpenAPI 3.1 import: Support DELETE with request body #1430

Open
opened 2026-03-16 20:18:50 +03:00 by kerem · 0 comments
Owner

Originally created by @xiic on GitHub (May 3, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4034

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 https://github.com/OAI/OpenAPI-Specification/pull/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
Originally created by @xiic on GitHub (May 3, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4034 ### Is there an existing issue for this? - [X] 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 https://github.com/OAI/OpenAPI-Specification/pull/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 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1430
No description provided.