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

[Java] overridden enums in allOf cause compilation failure #9794

Closed
frantuma opened this issue Oct 21, 2019 · 1 comment
Closed

[Java] overridden enums in allOf cause compilation failure #9794

frantuma opened this issue Oct 21, 2019 · 1 comment

Comments

@frantuma
Copy link
Member

In a scenario like, with latest 3.0.14-SNAPSHOT :

openapi: 3.0.0
info:
  version: 1.0.0
  title: Enums
paths: {}
components:
  schemas:
    Child:
      allOf:
        - $ref: '#/components/schemas/Parent'
        - type: object
          properties:
            foo:
              type: string
              enum:
                - bar
    Parent:
      type: object
      properties:
        id:
          type: string
        foo:
          type: string
          description: 'this property will be the one used'
          enum:
            - bar
            - foo

a generated java code doesn't compile as two different enums are used in generated Parent and Child pojos, with same accessors and name.

frantuma added a commit to swagger-api/swagger-codegen-generators that referenced this issue Oct 21, 2019
frantuma added a commit to swagger-api/swagger-codegen-generators that referenced this issue Oct 21, 2019
@frantuma
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant