Skip to content

OpenAPI 3.1.0 support: GET request body support with OpenAPI 3.1, swagger-ui 5.X #8682

Closed
@Nikit123

Description

@Nikit123

Q&A (please complete the following information)

  • OS: [macOS]
  • Browser: [chrome]
  • Version: [113.0]
  • Method of installation: [dist assets]
  • Swagger-UI version: [5.0.0-alpha.13]
  • Swagger/OpenAPI version: [OpenAPI 3.1]

How can we help?

I am using a GET api, where I need to send a request body. I took 5.0.0-alpha.13 distribution of swagger, as I saw that it is compatible with OpenAPI 3.1. Although, when I am running it with OpenAPI 3.1, and trying to execute my GET api I still get this error - 'TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body'.

My server handles the GET request body as I have tested it with Postman and I know that OpenAPI 3.1 supports request body with GET requests. Why is swagger-ui not allowing me to do the same? Am I missing something, or this support is not in place and planned for a future release?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions