OpenAPITools / OpenAPITools/openapi-generator
Code Generation Fails with `x-internal: true` in OpenAPI Spec Using openapi-generator-maven-plugin Version 7.5.0
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description:
When using the x-internal: true extension in our OpenAPI specification, we encountered an issue with the latest version of the openapi-generator-maven-plugin (version 7.5.0). The code generation process fails entirely, and no code is generated. This issue is not present in earlier versions, specifically 7.2.0 and 7.1.0, where the code generation works as expected with x-internal: true.
Steps to Reproduce:
- Add
x-internal: trueto any operation or schema within the OpenAPI spec. - Use
openapi-generator-maven-pluginversion 7.5.0 to generate code. - Observe that the code generation process fails.
Expected Behavior:
The code generation should succeed with version 7.5.0, just as it does with versions 7.2.0 and 7.1.0, when using thex-internal: trueextension.
Actual Behavior:
The code generation fails, and no output is generated.
Environment:
openapi-generator-maven-pluginversion: 7.5.0- OpenAPI Spec version: 7.2.0
- Java version: 17
- maven-compiler-plugin: 3.10.1
Additional Information:
This issue seems specific to thex-internal: trueextension, as removing or not using it in the spec results in successful code generation.
Please investigate this regression as it disrupts our code generation process, which relies heavily on this extension.
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 a minimal OpenAPI specification containing x-internal: true and reproduce the failure with openapi-generator-maven-plugin 7.5.0. Compare generation with versions 7.2.0 and 7.1.0; done means code generation succeeds in 7.5.0 without removing the extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100