Skip to content

Name clashes between auto-generated models and explicitly defined models #323

Closed
@forest-benchling

Description

@forest-benchling

Describe the bug
We have a model Entity with a property schema:

Entity:
      type: object
      additionalProperties: false
      properties:
        schema:
          allOf:
            - "$ref": "#/components/schemas/SchemaSummary"
          nullable: true

and we also have a model EntitySchema.

The auto-generated client has a model EntitySchema, which refers to the property on Entity, but it silently ignores the explicitly defined EntitySchema model.

To Reproduce
Generate the client with Entity and EntitySchema as above.

Expected behavior
There should be two separate models, one for the Entity.schema property, one for EntitySchema.

OpenAPI Spec File
See above

Desktop (please complete the following information):

  • OS: 10.15.4
  • Python Version: 3.8.5
  • openapi-python-client version v0.7.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions