swagger-core
swagger-core copied to clipboard
Description for array schema is being ignored when generating OpenAPI 3.1
I have the following Java code:
class Street {
@ArraySchema(schema = @Schema(implementation = House.class, description = "A house in the street"),
arraySchema = @Schema(description = "The houses in the street"))
public List<House> houses;
}
When generating OpenAPI 3.0, I get
Street:
type: object
properties:
houses:
type: array
description: The houses in the street
items:
$ref: "#/components/schemas/House"
The item description is missing, but that's another issue (https://github.com/swagger-api/swagger-core/issues/3900). However, when I generate OpenAPI 3.1, I get
Street:
type: object
properties:
houses:
type: array
items:
$ref: "#/components/schemas/House"
description: A house in the street
Now, the item description is there, but the array description is missing.