- Added some more negative enum cases

This commit is contained in:
Ferdi Koomen 2021-03-12 22:49:36 +01:00
parent 54c779552f
commit 0d70638abc
4 changed files with 27 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "openapi-typescript-codegen",
"version": "0.9.2",
"version": "0.9.3",
"description": "Library that generates Typescript clients based on the OpenAPI specification.",
"author": "Ferdi Koomen",
"homepage": "https://github.com/ferdikoomen/openapi-typescript-codegen",

View File

@ -590,10 +590,15 @@ exports[`v2 should generate: ./test/generated/v2/models/EnumWithNumbers.ts 1`] =
* This is a simple enum with numbers
*/
export enum EnumWithNumbers {
'_-1' = -1,
'_1' = 1,
'_2' = 2,
'_3' = 3,
'_100' = 100,
'_200' = 200,
'_300' = 300,
'_-100' = -100,
'_-200' = -200,
'_-300' = -300,
}"
`;
@ -3034,10 +3039,15 @@ exports[`v3 should generate: ./test/generated/v3/models/EnumWithNumbers.ts 1`] =
* This is a simple enum with numbers
*/
export enum EnumWithNumbers {
'_-1' = -1,
'_1' = 1,
'_2' = 2,
'_3' = 3,
'_100' = 100,
'_200' = 200,
'_300' = 300,
'_-100' = -100,
'_-200' = -200,
'_-300' = -300,
}"
`;

View File

@ -800,10 +800,15 @@
"EnumWithNumbers": {
"description": "This is a simple enum with numbers",
"enum": [
-1,
1,
2,
3
3,
100,
200,
300,
-100,
-200,
-300
]
},
"EnumFromDescription": {

View File

@ -1299,10 +1299,15 @@
"EnumWithNumbers": {
"description": "This is a simple enum with numbers",
"enum": [
-1,
1,
2,
3
3,
100,
200,
300,
-100,
-200,
-300
]
},
"EnumFromDescription": {