Skip to content

Commit 885e5a5

Browse files
committed
chore: add tests for extract enums
1 parent 3d0ebfd commit 885e5a5

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed

tests/spec/extract-enums/v3.0/expected.ts

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,49 @@ export enum TypeNamePrefixGetAbcGetParamsOrderByTypeNameSuffix {
135135
export interface TypeNamePrefixGetCdeGetParamsTypeNameSuffix {
136136
/** Tag Ids */
137137
tag_ids?: string[];
138-
SHOULD_NOT_BE_ANY?: any;
138+
SHOULD_NOT_BE_ANY?: {
139+
tree?: {
140+
mode?: TypeNamePrefixGetCdeGetParamsModeTypeNameSuffix;
141+
"mode-num"?: TypeNamePrefixGetCdeGetParamsModeNumTypeNameSuffix;
142+
type?: TypeNamePrefixGetCdeGetParamsTypeTypeNameSuffix;
143+
bereke?: TypeNamePrefixGetCdeGetParamsBerekeTypeNameSuffix;
144+
}[];
145+
};
139146
/**
140147
* Order By
141148
* @default "created_time"
142149
*/
143150
order_by?: TypeNamePrefixGetCdeGetParamsOrderByTypeNameSuffix;
144151
}
145152

153+
export enum TypeNamePrefixGetCdeGetParamsModeTypeNameSuffix {
154+
EnumKeyPrefixInvalidKey100644EnumKeySuffix = "100644",
155+
EnumKeyPrefixInvalidKey100755EnumKeySuffix = "100755",
156+
EnumKeyPrefixInvalidKey040000EnumKeySuffix = "040000",
157+
EnumKeyPrefixInvalidKey160000EnumKeySuffix = "160000",
158+
EnumKeyPrefixInvalidKey120000EnumKeySuffix = "120000",
159+
}
160+
161+
export enum TypeNamePrefixGetCdeGetParamsModeNumTypeNameSuffix {
162+
EnumKeyPrefixInvalidKey100644EnumKeySuffix = 100644,
163+
EnumKeyPrefixInvalidKey100755EnumKeySuffix = 100755,
164+
EnumKeyPrefixInvalidKey40000EnumKeySuffix = 40000,
165+
EnumKeyPrefixInvalidKey160000EnumKeySuffix = 160000,
166+
EnumKeyPrefixInvalidKey120000EnumKeySuffix = 120000,
167+
}
168+
169+
export enum TypeNamePrefixGetCdeGetParamsTypeTypeNameSuffix {
170+
EnumKeyPrefixBlobEnumKeySuffix = "blob",
171+
EnumKeyPrefixTreeEnumKeySuffix = "tree",
172+
EnumKeyPrefixCommitEnumKeySuffix = "commit",
173+
}
174+
175+
export enum TypeNamePrefixGetCdeGetParamsBerekeTypeNameSuffix {
176+
EnumKeyPrefixBlaEnumKeySuffix = "Bla",
177+
EnumKeyPrefixBlablaEnumKeySuffix = "Blabla",
178+
EnumKeyPrefixBoilerEnumKeySuffix = "Boiler",
179+
}
180+
146181
/**
147182
* Order By
148183
* @default "created_time"

tests/spec/extract-enums/v3.0/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
},
152152
{
153153
"required": false,
154-
"schemas": {
154+
"schema": {
155155
"properties": {
156156
"tree": {
157157
"items": {

tests/spec/extract-enums/v3.0/schema.ts

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,49 @@ export enum TypeNamePrefixGetAbcGetParamsOrderByTypeNameSuffix {
135135
export interface TypeNamePrefixGetCdeGetParamsTypeNameSuffix {
136136
/** Tag Ids */
137137
tag_ids?: string[];
138-
SHOULD_NOT_BE_ANY?: any;
138+
SHOULD_NOT_BE_ANY?: {
139+
tree?: {
140+
mode?: TypeNamePrefixGetCdeGetParamsModeTypeNameSuffix;
141+
"mode-num"?: TypeNamePrefixGetCdeGetParamsModeNumTypeNameSuffix;
142+
type?: TypeNamePrefixGetCdeGetParamsTypeTypeNameSuffix;
143+
bereke?: TypeNamePrefixGetCdeGetParamsBerekeTypeNameSuffix;
144+
}[];
145+
};
139146
/**
140147
* Order By
141148
* @default "created_time"
142149
*/
143150
order_by?: TypeNamePrefixGetCdeGetParamsOrderByTypeNameSuffix;
144151
}
145152

153+
export enum TypeNamePrefixGetCdeGetParamsModeTypeNameSuffix {
154+
EnumKeyPrefixInvalidKey100644EnumKeySuffix = "100644",
155+
EnumKeyPrefixInvalidKey100755EnumKeySuffix = "100755",
156+
EnumKeyPrefixInvalidKey040000EnumKeySuffix = "040000",
157+
EnumKeyPrefixInvalidKey160000EnumKeySuffix = "160000",
158+
EnumKeyPrefixInvalidKey120000EnumKeySuffix = "120000",
159+
}
160+
161+
export enum TypeNamePrefixGetCdeGetParamsModeNumTypeNameSuffix {
162+
EnumKeyPrefixInvalidKey100644EnumKeySuffix = 100644,
163+
EnumKeyPrefixInvalidKey100755EnumKeySuffix = 100755,
164+
EnumKeyPrefixInvalidKey40000EnumKeySuffix = 40000,
165+
EnumKeyPrefixInvalidKey160000EnumKeySuffix = 160000,
166+
EnumKeyPrefixInvalidKey120000EnumKeySuffix = 120000,
167+
}
168+
169+
export enum TypeNamePrefixGetCdeGetParamsTypeTypeNameSuffix {
170+
EnumKeyPrefixBlobEnumKeySuffix = "blob",
171+
EnumKeyPrefixTreeEnumKeySuffix = "tree",
172+
EnumKeyPrefixCommitEnumKeySuffix = "commit",
173+
}
174+
175+
export enum TypeNamePrefixGetCdeGetParamsBerekeTypeNameSuffix {
176+
EnumKeyPrefixBlaEnumKeySuffix = "Bla",
177+
EnumKeyPrefixBlablaEnumKeySuffix = "Blabla",
178+
EnumKeyPrefixBoilerEnumKeySuffix = "Boiler",
179+
}
180+
146181
/**
147182
* Order By
148183
* @default "created_time"

0 commit comments

Comments
 (0)