A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/swagger-api/swagger-codegen-generators/issues/321 below:

[JAVA] inherited objects are not used as parameters in operations. · Issue #321 · swagger-api/swagger-codegen-generators · GitHub

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 {
        ...
    }

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4