From de213f7012e41f67ff4b61aab3f261d449ae6057 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Dec 2025 12:13:39 +0000 Subject: [PATCH 1/5] Initial plan -- 2.51.2 From fb8623cff51fed4bca5064f8f22f9b18b01d8118 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:27:47 +0000 Subject: [PATCH 2/5] Fix discriminator inheritance to use Omit for proper type narrowing - Remove union of child discriminator values from intermediate types - Each type now gets only its direct discriminator value - Use Omit<> to remove parent discriminator properties and avoid conflicts - Enables proper TypeScript type narrowing with discriminated unions Example: CarDto.$type is now 'Car' instead of 'Car' | 'Volvo' VolvoDto uses Omit & { $type: 'Volvo' } Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- packages/openapi-ts/src/ir/types.d.ts | 5 ++ .../src/openApi/3.0.x/parser/schema.ts | 61 +++++++++++++------ .../src/openApi/3.1.x/parser/schema.ts | 60 ++++++++++++------ .../plugins/@hey-api/typescript/v1/plugin.ts | 22 ++++++- 4 files changed, 110 insertions(+), 38 deletions(-) diff --git a/packages/openapi-ts/src/ir/types.d.ts b/packages/openapi-ts/src/ir/types.d.ts index af7f669e8..9540ae007 100644 --- a/packages/openapi-ts/src/ir/types.d.ts +++ b/packages/openapi-ts/src/ir/types.d.ts @@ -182,6 +182,11 @@ interface IRSchemaObject * @default 'or' */ logicalOperator?: 'and' | 'or'; + /** + * When used with `$ref` or `symbolRef`, specifies properties to omit from the referenced schema. + * Useful for handling discriminator property conflicts in allOf compositions. + */ + omit?: ReadonlyArray; /** * When type is `object`, `patternProperties` can be used to define a schema * for properties that match a specific regex pattern. diff --git a/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts b/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts index 9813e7526..b6dfd33a1 100644 --- a/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts +++ b/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts @@ -80,15 +80,13 @@ const findDiscriminatorsInSchema = ({ }; /** - * Gets all discriminator values for a schema and its children in the inheritance hierarchy. - * For intermediate schemas (those that are extended by others), returns a union of all values. + * Gets the discriminator value for a schema. + * Returns only the schema's own discriminator value, not child values. */ const getAllDiscriminatorValues = ({ - context, discriminator, schemaRef, }: { - context: Context; discriminator: NonNullable; schemaRef: string; }): Array => { @@ -101,19 +99,6 @@ const getAllDiscriminatorValues = ({ if (mappedSchemaRef === schemaRef) { // This is the current schema's own value values.push(value); - continue; - } - - // Check if the mapped schema extends the current schema - const mappedSchema = context.resolveRef(mappedSchemaRef); - if (mappedSchema.allOf) { - for (const item of mappedSchema.allOf) { - if ('$ref' in item && item.$ref === schemaRef) { - // This schema extends the current schema, add its value - values.push(value); - break; - } - } } } @@ -521,7 +506,6 @@ const parseAllOf = ({ for (const { discriminator, isRequired, values } of discriminatorsToAdd) { // Get all discriminator values including children for union types const allValues = getAllDiscriminatorValues({ - context, discriminator, schemaRef: state.$ref!, }); @@ -544,6 +528,47 @@ const parseAllOf = ({ } : valueSchemas[0]!; + // Check if any $ref schemas in schemaItems have this discriminator property + // If yes, mark them to omit it to avoid conflicts + for (const item of schemaItems) { + if (item.$ref || item.symbolRef) { + // Check if the referenced schema has this property + const hasProperty = (() => { + if (!item.$ref) return false; + try { + const refSchema = context.resolveRef(item.$ref); + // Check if the discriminator property exists in the ref schema + return ( + refSchema.properties?.[discriminator.propertyName] !== + undefined || + (refSchema.allOf && + refSchema.allOf.some((allOfItem) => { + const resolved = + '$ref' in allOfItem + ? context.resolveRef(allOfItem.$ref) + : allOfItem; + return ( + resolved.properties?.[discriminator.propertyName] !== + undefined + ); + })) + ); + } catch { + return false; + } + })(); + + if (hasProperty) { + // Mark this ref to omit the discriminator property + if (!item.omit) { + item.omit = [discriminator.propertyName]; + } else if (!item.omit.includes(discriminator.propertyName)) { + item.omit = [...item.omit, discriminator.propertyName]; + } + } + } + } + // Find the inline schema (non-$ref) to merge the discriminator property into // The inline schema should be the last non-$ref item in schemaItems let inlineSchema: IR.SchemaObject | undefined; diff --git a/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts b/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts index 1f20bdba4..0ba9706da 100644 --- a/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts +++ b/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts @@ -84,15 +84,13 @@ const findDiscriminatorsInSchema = ({ }; /** - * Gets all discriminator values for a schema and its children in the inheritance hierarchy. - * For intermediate schemas (those that are extended by others), returns a union of all values. + * Gets the discriminator value for a schema. + * Returns only the schema's own discriminator value, not child values. */ const getAllDiscriminatorValues = ({ - context, discriminator, schemaRef, }: { - context: Context; discriminator: NonNullable; schemaRef: string; }): Array => { @@ -105,19 +103,6 @@ const getAllDiscriminatorValues = ({ if (mappedSchemaRef === schemaRef) { // This is the current schema's own value values.push(value); - continue; - } - - // Check if the mapped schema extends the current schema - const mappedSchema = context.resolveRef(mappedSchemaRef); - if (mappedSchema.allOf) { - for (const item of mappedSchema.allOf) { - if (item.$ref && item.$ref === schemaRef) { - // This schema extends the current schema, add its value - values.push(value); - break; - } - } } } @@ -602,7 +587,6 @@ const parseAllOf = ({ for (const { discriminator, isRequired, values } of discriminatorsToAdd) { // Get all discriminator values including children for union types const allValues = getAllDiscriminatorValues({ - context, discriminator, schemaRef: state.$ref!, }); @@ -625,6 +609,46 @@ const parseAllOf = ({ } : valueSchemas[0]!; + // Check if any $ref schemas in schemaItems have this discriminator property + // If yes, mark them to omit it to avoid conflicts + for (const item of schemaItems) { + if (item.$ref || item.symbolRef) { + // Check if the referenced schema has this property + const hasProperty = (() => { + if (!item.$ref) return false; + try { + const refSchema = context.resolveRef(item.$ref); + // Check if the discriminator property exists in the ref schema + return ( + refSchema.properties?.[discriminator.propertyName] !== + undefined || + (refSchema.allOf && + refSchema.allOf.some((allOfItem) => { + const resolved = allOfItem.$ref + ? context.resolveRef(allOfItem.$ref) + : allOfItem; + return ( + resolved.properties?.[discriminator.propertyName] !== + undefined + ); + })) + ); + } catch { + return false; + } + })(); + + if (hasProperty) { + // Mark this ref to omit the discriminator property + if (!item.omit) { + item.omit = [discriminator.propertyName]; + } else if (!item.omit.includes(discriminator.propertyName)) { + item.omit = [...item.omit, discriminator.propertyName]; + } + } + } + } + // Find the inline schema (non-$ref) to merge the discriminator property into // The inline schema should be the last non-$ref item in schemaItems let inlineSchema: IR.SchemaObject | undefined; diff --git a/packages/openapi-ts/src/plugins/@hey-api/typescript/v1/plugin.ts b/packages/openapi-ts/src/plugins/@hey-api/typescript/v1/plugin.ts index 8e8a6d642..28224e6a9 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/typescript/v1/plugin.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/typescript/v1/plugin.ts @@ -24,7 +24,16 @@ export const irSchemaToAst = ({ schema: IR.SchemaObject; }): MaybeTsDsl => { if (schema.symbolRef) { - return $.type(schema.symbolRef); + const baseType = $.type(schema.symbolRef); + if (schema.omit && schema.omit.length > 0) { + // Render as Omit + const omittedKeys = + schema.omit.length === 1 + ? $.type.literal(schema.omit[0]!) + : $.type.or(...schema.omit.map((key) => $.type.literal(key))); + return $.type('Omit').generics(baseType, omittedKeys); + } + return baseType; } if (schema.$ref) { @@ -33,7 +42,16 @@ export const irSchemaToAst = ({ resource: 'definition', resourceId: schema.$ref, }); - return $.type(symbol); + const baseType = $.type(symbol); + if (schema.omit && schema.omit.length > 0) { + // Render as Omit + const omittedKeys = + schema.omit.length === 1 + ? $.type.literal(schema.omit[0]!) + : $.type.or(...schema.omit.map((key) => $.type.literal(key))); + return $.type('Omit').generics(baseType, omittedKeys); + } + return baseType; } if (schema.type) { -- 2.51.2 From 714decff4c987fb1b2d1f06134e0b125cb07fb71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Dec 2025 17:14:26 +0000 Subject: [PATCH 3/5] Update test snapshots and regenerate examples for Omit discriminator changes - Updated discriminator test snapshots (3.0.x and 3.1.x) for: - discriminator-all-of - discriminator-allof-nested - transformers-all-of - Regenerated openapi-ts-fetch example with updated types - All snapshots now reflect the Omit<> wrapper for discriminator properties Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- .../3.0.x/discriminator-all-of/types.gen.ts | 14 +++++++------- .../3.0.x/discriminator-allof-nested/types.gen.ts | 8 ++++---- .../3.0.x/transformers-all-of/types.gen.ts | 4 ++-- .../3.1.x/discriminator-all-of/types.gen.ts | 14 +++++++------- .../3.1.x/discriminator-allof-nested/types.gen.ts | 8 ++++---- .../3.1.x/transformers-all-of/types.gen.ts | 4 ++-- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts index fc1946ad7..c424fbd5b 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts @@ -1,24 +1,24 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); + baseUrl: `${string}://specs` | (string & {}); }; export type Foo = { id: string; }; -export type Bar = Foo & { +export type Bar = Omit & { bar?: string; id: 'Bar'; }; -export type Baz = Foo & { +export type Baz = Omit & { baz?: string; id: 'Baz'; }; -export type Qux = Foo & { +export type Qux = Omit & { qux?: boolean; id: 'Qux'; }; @@ -27,17 +27,17 @@ export type FooMapped = { id: string; }; -export type BarMapped = FooMapped & { +export type BarMapped = Omit & { bar?: string; id: 'bar'; }; -export type BazMapped = FooMapped & { +export type BazMapped = Omit & { baz?: string; id: 'baz'; }; -export type QuxMapped = FooMapped & { +export type QuxMapped = Omit & { qux?: boolean; id: 'QuxMapped'; }; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts index 0f8d3a32e..624188948 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); + baseUrl: `${string}://specs` | (string & {}); }; export type VehicleDto = { @@ -9,12 +9,12 @@ export type VehicleDto = { id: number; }; -export type CarDto = VehicleDto & { +export type CarDto = Omit & { modelName: string; - $type: 'Car' | 'Volvo'; + $type: 'Car'; }; -export type VolvoDto = CarDto & { +export type VolvoDto = Omit & { seatbeltCount: number; $type: 'Volvo'; }; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts index 481f486a2..6aa351bcf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); + baseUrl: `${string}://specs` | (string & {}); }; export type Foo = { @@ -13,7 +13,7 @@ export type Bar = { bar: 'foo' | 'bar' | 'baz'; }; -export type Baz = Qux & { +export type Baz = Omit & { foo: number; bar: Date; baz: 'foo' | 'bar' | 'baz'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts index fc1946ad7..c424fbd5b 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts @@ -1,24 +1,24 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); + baseUrl: `${string}://specs` | (string & {}); }; export type Foo = { id: string; }; -export type Bar = Foo & { +export type Bar = Omit & { bar?: string; id: 'Bar'; }; -export type Baz = Foo & { +export type Baz = Omit & { baz?: string; id: 'Baz'; }; -export type Qux = Foo & { +export type Qux = Omit & { qux?: boolean; id: 'Qux'; }; @@ -27,17 +27,17 @@ export type FooMapped = { id: string; }; -export type BarMapped = FooMapped & { +export type BarMapped = Omit & { bar?: string; id: 'bar'; }; -export type BazMapped = FooMapped & { +export type BazMapped = Omit & { baz?: string; id: 'baz'; }; -export type QuxMapped = FooMapped & { +export type QuxMapped = Omit & { qux?: boolean; id: 'QuxMapped'; }; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts index 0f8d3a32e..624188948 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); + baseUrl: `${string}://specs` | (string & {}); }; export type VehicleDto = { @@ -9,12 +9,12 @@ export type VehicleDto = { id: number; }; -export type CarDto = VehicleDto & { +export type CarDto = Omit & { modelName: string; - $type: 'Car' | 'Volvo'; + $type: 'Car'; }; -export type VolvoDto = CarDto & { +export type VolvoDto = Omit & { seatbeltCount: number; $type: 'Volvo'; }; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts index 481f486a2..6aa351bcf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); + baseUrl: `${string}://specs` | (string & {}); }; export type Foo = { @@ -13,7 +13,7 @@ export type Bar = { bar: 'foo' | 'bar' | 'baz'; }; -export type Baz = Qux & { +export type Baz = Omit & { foo: number; bar: Date; baz: 'foo' | 'bar' | 'baz'; -- 2.51.2 From 27191ecb991ea536c9c615b5eff80625360e1097 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Dec 2025 17:17:56 +0000 Subject: [PATCH 4/5] Fix baseUrl in test snapshots - Updated baseUrl template in snapshots to match generated output - Changed from ${string}://specs to ${string}://${string} - All discriminator tests now pass Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- .../test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts | 2 +- .../__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts | 2 +- .../test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts | 2 +- .../test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts | 2 +- .../__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts | 2 +- .../test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts index c424fbd5b..874da6f73 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-all-of/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://specs` | (string & {}); + baseUrl: `${string}://${string}` | (string & {}); }; export type Foo = { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts index 624188948..0ec93b2a7 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/discriminator-allof-nested/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://specs` | (string & {}); + baseUrl: `${string}://${string}` | (string & {}); }; export type VehicleDto = { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts index 6aa351bcf..11ecb1657 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://specs` | (string & {}); + baseUrl: `${string}://${string}` | (string & {}); }; export type Foo = { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts index c424fbd5b..874da6f73 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-all-of/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://specs` | (string & {}); + baseUrl: `${string}://${string}` | (string & {}); }; export type Foo = { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts index 624188948..0ec93b2a7 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/discriminator-allof-nested/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://specs` | (string & {}); + baseUrl: `${string}://${string}` | (string & {}); }; export type VehicleDto = { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts index 6aa351bcf..11ecb1657 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: `${string}://specs` | (string & {}); + baseUrl: `${string}://${string}` | (string & {}); }; export type Foo = { -- 2.51.2 From 6f8a43c7ffcc8685700c3789c6339aabbac07d2b Mon Sep 17 00:00:00 2001 From: Lubos Date: Sat, 20 Dec 2025 02:21:29 +0800 Subject: [PATCH 5/5] Enhance type narrowing in discriminated types Improved type narrowing in discriminated types for better type safety. --- .changeset/happy-points-run.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/happy-points-run.md diff --git a/.changeset/happy-points-run.md b/.changeset/happy-points-run.md new file mode 100644 index 000000000..136d7a1f7 --- /dev/null +++ b/.changeset/happy-points-run.md @@ -0,0 +1,5 @@ +--- +"@hey-api/openapi-ts": patch +--- + +**plugin(@hey-api/typescript)**: improve type narrowing in discriminated types -- 2.51.2