openapi-generators / openapi-generators/openapi-python-client
use key not title for class name
Open
Nobody has claimed this yet.
🐞bug
- Dominant language
- Python
- Stars
- 2k
- Forks
- 293
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
in components -> schemas

here i have erros:
Unable to parse schema /components/schemas/HRVSample
Unable to parse this part of your OpenAPI document: : Attempted to generate duplicate models with name "Sample"
why used the title for class names and not the key. The key is always unique, but the title is not necessarily unique.
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 with the OpenAPI components/schemas entry for HRVSample and trace how the client generator derives model class names from its key and title. Done means schemas with distinct keys but the same title generate distinct models without the duplicate-model error shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100