Skip to content

Commit 0144c5f

Browse files
authored
Merge pull request #2008 from hey-api/fix/one-of-discriminator-required
chore: fix oneOf discriminator pull request for OpenAPI 3.1
2 parents d94c9ae + e10b895 commit 0144c5f

File tree

77 files changed

+155
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+155
-155
lines changed

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/bundle/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/bundle/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/bundle/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

packages/openapi-ts-tests/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ export type ModelSquare = {
442442
* This is a model with one property with a 'one of' relationship where the options are not $ref
443443
*/
444444
export type CompositionWithOneOfDiscriminator = ({
445-
kind?: 'circle';
445+
kind: 'circle';
446446
} & ModelCircle) | ({
447-
kind?: 'square';
447+
kind: 'square';
448448
} & ModelSquare);
449449

450450
/**

0 commit comments

Comments
 (0)