Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][JAVA] Upgrading java-camel generator from version 7.8.0 to 7.9.0 breaks processing of oneOf / anyOf definitions #20312

Open
kulon opened this issue Dec 12, 2024 · 0 comments

Comments

@kulon
Copy link

kulon commented Dec 12, 2024

Description

We upgraded from version 7.8.0 to 7.9.0 and found that changes between these versions break the java-camel generator's processing of the oneOf/anyOf definitions.

For example, the following schema generates proper code with version 7.8.0, but the generator version 7.9.0 creates a class with no fields. We are using version 3.0.3 of the OpenAPI spec.

"Request": {
      "type": "object",
      "properties": {
        "referenceNumber": {"type": "string", "nullable": true},
        "documentNumber": { "type": "string", "nullable": true},
        "stockNumber": {"type": "string", "nullable": true}
      },
      "oneOf": [
        {
          "required" : [ "referenceNumber" ]
        },
        {
          "anyOf": [
            {
              "required": [ "documentNumber" ]
            },
            {
              "required": [ "stockNumber" ]
            }
          ]
        }
      ]
    }
openapi-generator version

version 7.9.0 of the java-camel generator

OpenAPI declaration file content or url

The full test project including the OpenAPI spec and the generators configuration can be found at
https://github.com/kulon/code-samples/tree/main/openapi-generator-sample

@kulon kulon changed the title [BUG] Description [BUG][JAVA] Upgrading **java-camel** generator from version 7.8.0 to 7.9.0 breaks processing of _oneOf/anyOf_ definitions Dec 12, 2024
@kulon kulon changed the title [BUG][JAVA] Upgrading **java-camel** generator from version 7.8.0 to 7.9.0 breaks processing of _oneOf/anyOf_ definitions [BUG][JAVA] Upgrading java-camel generator from version 7.8.0 to 7.9.0 breaks processing of oneOf / anyOf definitions Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant