Skip to content

Commit 79274ac

Browse files
authored
Merge pull request #455 from acacode/next
Release 12.0.2
2 parents 1ce2dd5 + 4d4b0f5 commit 79274ac

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)