Skip to content

Generator: duplicate class names across packages cause TS barrel export collision #1101

Description

@jsenko

The GenerateCoreTs barrel file generator creates export * from "..." for every .ts file. When two modules in different packages export the same simple name (e.g., Schema trait in models/ and Schema union in models/jsonschema/), the TS compiler rejects the duplicate export.

Current workaround: rename the type alias to avoid collision.

Long-term fix options:

  1. GenerateCoreTs could detect duplicate names and use named re-exports
  2. The generator could ensure unique simple names across all packages
  3. Future: OpenAPI/AsyncAPI should use JSON Schema models directly instead of duplicating schema entities, eliminating the shared Schema trait

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/javascriptPull requests that update Javascript codepriority/normalIssues with default priority - these are important and interesting but can be worked on in due time.type/bugIssues deemed to be bugs/flaws in the software.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions