Skip to content

Commit c1ab143

Browse files
authored
Merge pull request #3727 from hey-api/copilot/fix-default-field-in-zod-enum
fix: zod enum properties respect the `default` field
2 parents 0983189 + 73846df commit c1ab143

172 files changed

Lines changed: 455 additions & 443 deletions

File tree

Some content is hidden

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

.changeset/wide-banks-pay.md

Lines changed: 6 additions & 0 deletions

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/axios/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/preact-query/fetch/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ export type ComplexParamsData = {
19601960
readonly key: string | null;
19611961
name: string | null;
19621962
enabled?: boolean;
1963-
type: 'Monkey' | 'Horse' | 'Bird';
1963+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19641964
listOfModels?: Array<ModelWithString> | null;
19651965
listOfStrings?: Array<string> | null;
19661966
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

0 commit comments

Comments
 (0)