-
-
Notifications
You must be signed in to change notification settings - Fork 553
Open
Description
If a POJO model is described as the "application/x-www-form-urlencoded" request body content for the POST operation, see the DemoController#getBytes() in the attached demo project, an unexpected "application/json" content is also added to the OAS. This happens for both OAS 3.0 and 3.1.
To Reproduce
Steps to reproduce the behavior:
- The spring-boot version is 3.5.7.
- The springdoc-openapi-starter-webmvc-ui version 2.8.12.
- Unpack the demo project.
- In
pom.xmltoggle betweenspringdoc-openapi-starter-webmvc-uiversion 2.8.11 and 2.8.12. - Run the project locally and open the spec on http://localhost:8080/v3/api-docs
- for 2.8.11 the "application/json" requestBody content is not present
- for 2.8.12 the "application/json" unexpected requestBody content is present
Expected behavior
The "application/json" request body content shall not appear in the generated OAS since an explicit request body content schema is provided by the @RequestBody.content annotation (same behavior as in 2.8.11)
Additional context
Observed also in the version 2.8.14.
Metadata
Metadata
Assignees
Labels
No labels
