Skip to content

models are not generated correctly if we have properties along with allOf in a model. #273

@ieglonew01f

Description

@ieglonew01f

If we have the following in an yaml, having a combination of base properties and allOf

someParams:
    description: some description.
    type: object
    properties:
      id:
        description: some description.
        type: integer
        format: int64
        x-nullable: true
    allOf:
      - $ref: "#/definitions/commonParams"
      - type: object
        properties:
          bannana:
            description: some banana.
            type: integer
            format: int64
            x-nullable: true

then the generated models looks something like this

export interface SomeParams extends CommonParams {
    bannana: integer;
}

where else the generated model should look like this

export interface SomeParams extends CommonParams {
    id: integer;
    bannana: integer;
}

notice that all properties above allOf are missing in the final model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions