Closed
Description
Let's take an example of two simple classes:
public class GeoPointDto {
@Schema(description = "Longitude of geo point ( -180, 180 >")
private double lon;
@Schema(description = "Latitude of geo point < -90, 90 >")
private double lat;
}
public class RouteDto {
@Schema(description = "Point where the route begins")
private GeoPointDto startPoint;
@Schema(description = "Intermediate point of the route")
private GeoPointDto intermediatePoint;
@Schema(description = "Point where the route ends")
private GeoPointDto endPoint;
}
Expected behavior is to have three fields inside RouteDto with different descirption each.
Actual behavior is that all fields has same description = "Point where the route ends" which is the description of third field.
JSON:
"components" : {
"schemas" : {
"RouteDto" : {
"type" : "object",
"properties" : {
"startPoint" : {
"$ref" : "#/components/schemas/GeoPointDto"
},
"intermediatePoint" : {
"$ref" : "#/components/schemas/GeoPointDto"
},
"endPoint" : {
"$ref" : "#/components/schemas/GeoPointDto"
}
}
},
"GeoPointDto" : {
"type" : "object",
"properties" : {
"lon" : {
"type" : "number",
"description" : "Longitude of geo point ( -180, 180 >",
"format" : "double"
},
"lat" : {
"type" : "number",
"description" : "Latitude of geo point < -90, 90 >",
"format" : "double"
}
},
"description" : "Point where the route ends"
}
}
}
Metadata
Metadata
Assignees
Labels
No labels