Skip to content

Commit cb0124a

Browse files
Copilotmrlubos
authored andcommitted
fix: enum schemas now respect the default field in zod and other plugins
Agent-Logs-Url: https://github.com/hey-api/openapi-ts/sessions/289ced46-1239-4bc9-8165-9dc3d21f49f9
1 parent 72fdd47 commit cb0124a

168 files changed

Lines changed: 245 additions & 239 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.

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;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-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;

0 commit comments

Comments
 (0)