OpenAPITools / OpenAPITools/openapi-generator
[BUG] Examples are not generated
Open
Nobody has claimed this yet.
Issue: Bug
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
I'm writing the following API:
responses:
'200':
description: the full list of resp
content:
application/hal+json:
schema:
$ref: '#/components/schemas/MyResponse'
examples:
FirstExample:
description: first example
value:
idIstance: idIstance
And using the javaSpring generator. The example section is empty even though, as you can see, I'm putting them in.
openapi-generator version
Maven plugin version 4.3.0
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
Reproduce the issue with the provided OpenAPI YAML using the javaSpring generator and Maven plugin version 4.3.0. Inspect the generated response output and related generator behavior; the work is done when the declared application/hal+json example appears in the generated result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100