Skip to content
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

Description for array schema is being ignored in 3.1 #4836

Open
jochenberger opened this issue Jan 21, 2025 · 0 comments
Open

Description for array schema is being ignored in 3.1 #4836

jochenberger opened this issue Jan 21, 2025 · 0 comments

Comments

@jochenberger
Copy link

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 (#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant