Skip to content

Commit c2dee04

Browse files
committed
chore: add more use cases
1 parent 0ab7301 commit c2dee04

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

tests/spec/enumIncludesNumber/__snapshots__/basic.test.ts.snap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ exports[`basic > use x-enumNames as the key for enum 1`] = `
1313
* ---------------------------------------------------------------
1414
*/
1515
16-
export enum StringEnumWithoutKey {
16+
export enum StringEnumIncludesNumbersAndUnderscore {
1717
VAL_1 = "VAL_1",
1818
VAL_2 = "VAL_2",
1919
VAL_3 = "VAL_3",
2020
_1_VAL = "_1_VAL",
21+
A_1_B_2_C_3 = "A_1_B_2_C_3",
22+
_A_1_B_2_C_3 = "_A_1_B_2_C_3",
23+
_1_A_2_B_3_C = "_1_A_2_B_3_C",
2124
}
2225
"
2326
`;

tests/spec/enumIncludesNumber/schema.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44
"servers": [],
55
"components": {
66
"schemas": {
7-
"StringEnumWithoutKey": {
7+
"StringEnumIncludesNumbersAndUnderscore": {
88
"type": "string",
9-
"enum": ["VAL_1", "VAL_2", "VAL_3", "_1_VAL"]
9+
"enum": [
10+
"VAL_1",
11+
"VAL_2",
12+
"VAL_3",
13+
"_1_VAL",
14+
"A_1_B_2_C_3",
15+
"_A_1_B_2_C_3",
16+
"_1_A_2_B_3_C"
17+
]
1018
}
1119
}
1220
}

0 commit comments

Comments
 (0)