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] inherited objects are not used as parameters in operations. #321

Closed
HugoMario opened this issue Mar 3, 2019 · 0 comments · Fixed by #324
Closed

[JAVA] inherited objects are not used as parameters in operations. #321

HugoMario opened this issue Mar 3, 2019 · 0 comments · Fixed by #324
Assignees
Labels
Milestone

Comments

@HugoMario
Copy link
Contributor

when there is an object that inherits from another object via allOf. If the inherited object is used in the request body of the post operation the generated Java code method call has the type Object.

    Animal:
      required:
      - className
      type: object
      properties:
        className:
          type: string
        color:
          type: string
          default: red
      discriminator:
        propertyName: className

    Dog:
      allOf:
      - $ref: '#/components/schemas/Animal'
      - type: object
        properties:
          breed:
            type: string
    public void addAnimal(Animal body) throws ApiException {
        ...
    }
    public void addDog(Object body) throws ApiException {
        ...
    }
@HugoMario HugoMario added this to the v3.0.6 milestone Mar 3, 2019
@HugoMario HugoMario self-assigned this Mar 3, 2019
@HugoMario HugoMario added the bug label Mar 3, 2019
@HugoMario HugoMario mentioned this issue Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant