When giving a property as variable in description of @RequestBody annotation it is not showing the actual value of the property

55 Views Asked by At

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 Using swagger via spring-doc Swagger-UI version: 4.18.2 Swagger/OpenAPI version: OpenAPI 3.0

I tried using only @Parameter but then the description is not at all visible.

0

There are 0 best solutions below