swagger-api / swagger-api/swagger-core
[Question]: Duplicate schema names don't throw but are overwritten
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
Question
Is it possible for the library to throw an exception if there are duplicate schema names?
I have a large codebase that generates OpenAPI Server documentation based on annotations. However, the clients are affected by this issue, where some schemas are overwritten due to this duplication.
Affected Version
2.2.30
Context
It is related to this issue.
Checklist
- I have searched the existing issues and documentation before asking.
- I have provided enough information for others to understand my question.
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
Review issue #2538 and the schema-generation path in swagger-core version 2.2.30. Confirm the expected handling of duplicate schema names and verify that the reported overwrite behavior is addressed; done when the chosen behavior is explicit and duplicate schemas do not silently overwrite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100