Skip to content

Version Packages#1766

Merged
js2me merged 1 commit into
mainfrom
changeset-release/main
May 28, 2026
Merged

Version Packages#1766
js2me merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

swagger-typescript-api@13.11.0

Minor Changes

  • f5cb2da Thanks @js2me! - Fix external file $ref resolution and add cleaner schema naming for split OpenAPI specs.

    Bug fixes

    • Resolve external schema file refs (e.g. ./SidecarConfig.yaml, ./models/sidecar-config.yaml) without producing ghost types such as SidecarConfigYaml that were referenced in generated output but never exported.
    • Treat path segments like models, definitions, and . as schema components instead of misclassifying them as OpenAPI component sections.
    • Normalize type names derived from external filenames by stripping .yaml, .yml, and .json extensions.
    • Unwrap file-only refs to external documents that contain a single entry under components.schemas.
    • Deduplicate externally resolved components that share the same disambiguated type name, preventing repeated export interface declarations (e.g. multiple NovaEntityNovaEntity) and TypeScript merge conflicts.
    • Recognize OpenAPI 3.1 pathItems as a valid components section when resolving JSON pointer segments.

    New option

    • Add preferExistingSchemaNamesForExternalRefs (CLI: --prefer-existing-schema-names-for-external-refs).
      When enabled, if an external schema file name matches an existing local component name (e.g. ./Specification.yamlSpecification), the generator reuses the local schema name instead of emitting redundant names like SpecificationSpecification or NovaEntityNovaEntity.
      Local $ref-only components are eagerly resolved before parsing.

    Tests

    • Add paths-2 regression tests for remote OpenAPI specs with relative cross-file refs (CICD Spec Manager fixture).
    • Add paths-2-prefer-existing-schema-names tests for the new naming option, including strict TypeScript checks of generated snapshot output via tsc.

Patch Changes

  • #1762 6d00192 Thanks @Upgrade220! - Fix ContentType in http-client not respecting enumStyle: "union". It now generates a plain type alias instead of an enum, and all call sites emit string literals instead of ContentType.Json etc.

@github-actions github-actions Bot force-pushed the changeset-release/main branch 3 times, most recently from 14faa6b to 2e9ba45 Compare May 28, 2026 07:10
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 2e9ba45 to aa89ed1 Compare May 28, 2026 07:10
@js2me js2me merged commit 03e439a into main May 28, 2026
4 checks passed
@js2me js2me deleted the changeset-release/main branch May 28, 2026 07:13
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

Successfully merging this pull request may close these issues.

1 participant