openai / openai/openai-openapi
Inline union schemas produce unstable generated type names (Object124, etc.)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
Issue:
Inline schemas in anyOf/oneOf (e.g., VideoModel) cause code generators to emit numbered types like Object124 that shift on every spec update, breaking typed clients in Python, TypeScript, Go, Java, and C#.
Fix:
Either promote inline schemas to named components, or add title properties to inline schemas, e.g.,
VideoModelEnum:
type: string
enum:
- sora-2
- sora-2-pro
VideoModel:
anyOf:
- type: string
- $ref: "#/components/schemas/VideoModelEnum"
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 locating the inline anyOf/oneOf schemas such as VideoModel in the OpenAPI specification and compare generated type names across Python, TypeScript, Go, Java, and C# clients. The work is done when these schemas use named components or title properties and generated names remain stable after a specification update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, go, java, openapi, python, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100