OpenAPITools / OpenAPITools/openapi-generator

Code Generation Fails with `x-internal: true` in OpenAPI Spec Using openapi-generator-maven-plugin Version 7.5.0

Open
#19,424 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
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:

  1. Add x-internal: true to any operation or schema within the OpenAPI spec.
  2. Use openapi-generator-maven-plugin version 7.5.0 to generate code.
  3. 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 the x-internal: true extension.
    Actual Behavior:
    The code generation fails, and no output is generated.
    Environment:
  • openapi-generator-maven-plugin version: 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 the x-internal: true extension, 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.