swagger-api / swagger-api/swagger-core

[Question]: Duplicate schema names don't throw but are overwritten

Open
#5,016 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog Question
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.