swagger-api / swagger-api/swagger-ui
When giving a property as variable in description of @RequestBody annotation it is not showing the actual value of the property.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: Windows
- Browser: Chrome
- Version: 117.0.5938.149
- Method of installation: Using swagger via spring-doc
- Swagger-UI version: 4.18.2
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
I have a spring boot project. When I try to add @io.swagger.v3.oas.annotations.parameters.RequestBody annotation to a request body in a controller like this:
@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "${somepropertyname.somesubpropertyname.value}"
instead of displaying the value of the property it just displays the property as it is on the ui.
Where as for other annotation like @Paramter, @Schema, @Operation etc it is giving the desired result.
Any help here is appreciated.
PS: I am using Spring Boot 3.1.1 and Java 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with Spring Boot 3.1.1, Java 17, and springdoc using a RequestBody description containing a property placeholder. Compare the generated OpenAPI description with the other annotations mentioned, and determine whether the missing interpolation occurs before Swagger UI renders it; done means the actual property value is shown and the behavior has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100