OpenAPITools / OpenAPITools/openapi-generator
[BUG] Code gen for inline response schemata
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
The swagger docs mention being able to Describing Responses inline .. https://swagger.io/docs/specification/describing-responses/ (ie no refs).
However when I tried this then the spring code gen created no model objects to represent the return value.
It does create an api/ dir but the the apis all ended up as returning "ResponseEntity" and the annotation on the interface are all Object.class.
Is it a fact that the code gen tooling does not support inline response schemata and I must always place this in the components/* section and use ref ?
I'm reporting as a I was expecting this to do something useful which at present it does not.
I will give more of a workup if someone thinks this ought to work.
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 linked Swagger documentation and create a minimal Spring code-generation case using an inline response schema. Inspect the generated api/ interfaces, ResponseEntity return types, and Object.class annotations, then compare them with generation from a referenced component schema. Done means determining whether inline response schemas should produce concrete model and return types, with a reproducible result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100