Skip to content

Commit 4d4b0f5

Browse files
committed
bump: up version 12.0.2; fix: missing option --extract-enums (#344)
1 parent 27ed813 commit 4d4b0f5

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# next release
22

3+
## 12.0.2
4+
5+
fix: missing option `--extract-enums` (#344)
6+
37
## 12.0.1
48

59
fix: problem based with http requests and `disableStrictSSL` option (#453)

index.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ interface GenerateApiParamsBase {
5454
*/
5555
unwrapResponseData?: boolean;
5656

57+
/**
58+
* sort data contracts in alphabetical order
59+
*/
60+
sortTypes?: boolean;
61+
5762
/**
5863
* generate js api module with declaration file (default: false)
5964
*/
@@ -139,20 +144,28 @@ interface GenerateApiParamsBase {
139144

140145
/** extract all enums from nested types\interfaces to `enum` construction */
141146
extractEnums?: boolean;
147+
142148
/** prefix string value needed to fix invalid type names (default: 'Type') */
143149
fixInvalidTypeNamePrefix?: string;
150+
144151
/** prefix string value needed to fix invalid enum keys (default: 'Value') */
145152
fixInvalidEnumKeyPrefix?: string;
153+
146154
/** prefix string value for enum keys */
147155
enumKeyPrefix?: string;
156+
148157
/** suffix string value for enum keys */
149158
enumKeySuffix?: string;
159+
150160
/** prefix string value for type names */
151161
typePrefix?: string;
162+
152163
/** suffix string value for type names */
153164
typeSuffix?: string;
165+
154166
/** extra configuration for extracting type names operations */
155167
extractingOptions?: Partial<ExtractingOptions>;
168+
156169
/** configuration for fetching swagger schema requests */
157170
requestOptions?: null | Partial<import("node-fetch").RequestInit>;
158171
}

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ const main = async () => {
292292
apiClassName: options.apiClassName,
293293
debug: options.debug,
294294
anotherArrayType: options.anotherArrayType,
295+
extractEnums: options.extractEnums,
295296
});
296297
break;
297298
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swagger-typescript-api",
3-
"version": "12.0.1",
3+
"version": "12.0.2",
44
"description": "Generate typescript/javascript api from swagger schema",
55
"scripts": {
66
"cli:json": "node index.js -r -d -p ./swagger-test-cli.json -n swagger-test-cli.ts",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy