Skip to content

Duplicate entries when using inheritance or composition #4258

@yannickadam

Description

@yannickadam
Description

A PR(#3935) has been opened by @j4velin regarding this problem, but I cannot find any related issue.

Using the simple definition below, we get duplicate vars for seaplane:

image

Also, I am unsure if the PR fully fixes the issue. Since the second call to addVars(...) will add new properties to m.allVars instead of m.vars, these properties will not be taken into account by postProcessModelProperty as it is run only on m.vars.

Swagger-codegen version

Master branch

Swagger declaration file content or url
definitions:
  plane:
    type: object
    properties:
      name:
        type: string
      length: 
        type: string

  seaplane:
    type: object
    allOf:
      - $ref: '#/definitions/plane'
      - type: object
        properties:
          other: 
            type: string

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions