-
-
Notifications
You must be signed in to change notification settings - Fork 548
Closed
Description
Describe the bug
When using @JsonValue
from Jackson, the @Schema
on the field is not picked up by swagger and not present in the docs.
To Reproduce
- Spring Boot 2.4.2
- Springdocs 1.5.2
class Request {
@Schema(description = "Description of ID.")
private Id id;
public Id getId() {
return id;
}
public void setId(Id id) {
this.id = id;
}
}
class Id {
private String value;
@JsonValue
public String getValue() {
return value;
}
}
Actual API docs
{
"components": {
"schemas": {
"Request": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
}
}
}
}
Expected behavior
Expected API Docs
{
"components": {
"schemas": {
"Request": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Description of ID."
}
}
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels