Skip to content

Separate pointers to the same schema generate duplicate types #142

Closed
@xavdid

Description

@xavdid

Hello! I was working through our (seeming non-standard) case and I found an unexpected result.

We've got a TriggerSchema and a CreateSchema that both have a reference to the BasicDisplaySchema. When we generate the types, we end up with a lot of identical BasicDisplaySchema interfaces (BasicDisplaySchema, BasicDisplaySchema1, etc).

The declaration of the schemas is identical except for the description:

Trigger (source):

      display: {
        description: 'Configures the UI for this trigger.',
        $ref: BasicDisplaySchema.id
      },

Create (source):

      display: {
        description: 'Configures the UI for this create.',
        $ref: BasicDisplaySchema.id
      },

Since these are both references to the same schema, despite their different description, it would make sense for them to generate a single, canonical BasicDisplaySchema. It's totally possible that this is by design, but if it's either something we can fix (or make configurable), that would be awesome! I can post the full schema or any other resources if that's helpful.

Thanks a bunch!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions