-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override description for items in array schema #4802
Comments
FTR, If I use OpenAPI 3.0, I only get the |
For single-valued properties, the description can be set. class Street {
@Schema(description = "The elected leader")
public Person spokesPerson;
}
results in Street:
type: object
properties:
spokesPerson:
$ref: "#/components/schemas/Person"
description: The elected leader |
See also #4753 |
If seems to work if I use ...
type: array
items:
description: A house in a street
allOf:
- $ref: "#/components/schemas/House" which is correct but unnecessarily complicated in OpenAPI 3.1. |
With 2.2.28, I get the correct result with |
I'm using OpenAPI 3.1.
I have the following classes:
The generated YAML looks like this:
The description for the items is not included.
If I remove the
implementation = House.class
from the inner schema definition, I getNow the description is there, but the
$ref
is gone.I'd expect the item definition to contain both the
$ref
and thedescription
in both cases.The text was updated successfully, but these errors were encountered: