-
-
Notifications
You must be signed in to change notification settings - Fork 585
Closed
Description
- A clear and concise description of what the bug is: the title of an issue is not enough
After upgrading from spring doc (springdoc-openapi-starter-webmvc-ui) from 2.7.0 to 2.8.6 descriptions from @ArraySchema has disappeared.
To Reproduce
Steps to reproduce the behavior:
-
What version of spring-boot you are using?
3.4.4 -
What modules and versions of springdoc-openapi are you using?
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.8.6</version>
</dependency>
DTO Class:
public class ClassName {
@Schema(description = "A text here1.")
private String fieldName1;
@ArraySchema(arraySchema = @Schema(description = "A text here2."))
private List<String> fieldName2 = new ArrayList<>();
...
}- What is the actual and the expected result using OpenAPI Description (yml or json)?
Actual result (api-docs):
...
"components": {
"schemas": {
"ClassName": {
"type": "object",
"properties": {
"fieldName1": {
"type": "string",
"description": "A text here1."
},
"fieldName2": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
...Expected result:
...
"components": {
"schemas": {
"ClassName": {
"type": "object",
"properties": {
"fieldName1": {
"type": "string",
"description": "A text here1."
},
"fieldName2": {
"type": "array",
"description": "A text here2.",
"items": {
"type": "string"
}
}
}
}
...Expected behavior
I expect that the description from @ArraySchema appears in components schema.
What have I tried:
I have tried to change the @ArraySchema(arraySchema = @Schema(description = "A text here2.")) to @Schema(description = "A text here2.") but then the descriptions from @ArraySchema appears twice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels