swagger-api / swagger-api/swagger-core
@ArraySchema name does not override parameter name
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
This
@ArraySchema(arraySchema = @Schema(description = "Status of the receipt", name = "status", example = "paid"))
private List<ReceiptStatus> statuses;
results in a parameter of type array with name statuses.
As per the documentation (https://docs.swagger.io/swagger-core/v2.2.10/apidocs/io/swagger/v3/oas/annotations/media/ArraySchema.html#arraySchema()) my expectation was the property name to override the parameter name.
Tested with swagger-core 2.2.9, springdpc-openapi-securiy 1.7.0, swagger-annotations 2.2.10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the shown @ArraySchema example with swagger-core and inspect how arraySchema() handles the nested @Schema name. Confirm the generated parameter currently uses statuses, then verify that the documented name override behavior is reflected in the generated OpenAPI output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100