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

[REQ] openapi-generator-maven-plugin oneOf support #9140

Open
tillias opened this issue Mar 31, 2021 · 0 comments
Open

[REQ] openapi-generator-maven-plugin oneOf support #9140

tillias opened this issue Mar 31, 2021 · 0 comments

Comments

@tillias
Copy link

tillias commented Mar 31, 2021

Is your feature request related to a problem? Please describe.

We have following JSON Schema

{
  "$id": "https://example.com/some.schema.json",
  "title": "some",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "someEnum": {
      "type": "object",
      "oneOf": [
        {
          "properties": {
            "businessId": {
              "const": "001"
            },
            "name": {
              "const": "first"
            }
            ...
          },
          "required": ["businessId", "name"]
        },
        {
          "properties": {
            "businessId": {
              "const": "002"
            },
            "name": {
              "const": "second"
            }
          },
          "required": ["businessId", "name"]
        }
      ]
    }
  },

  "required": ["id", "someEnum"]
}

Describe the solution you'd like

It would be nice supporting generation of "someEnum". At the moment it is simply empty class

Describe alternatives you've considered

joelittlejohn/jsonschema2pojo#1193

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