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

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

Open
ieglonew01f opened this issue Nov 5, 2022 · 0 comments

Comments

@ieglonew01f
Copy link

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.

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