File tree Expand file tree Collapse file tree 5 files changed +20
-2
lines changed Expand file tree Collapse file tree 5 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
1
# next release
2
2
3
+ ## 12.0.2
4
+
5
+ fix: missing option ` --extract-enums ` (#344 )
6
+
3
7
## 12.0.1
4
8
5
9
fix: problem based with http requests and ` disableStrictSSL ` option (#453 )
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ interface GenerateApiParamsBase {
54
54
*/
55
55
unwrapResponseData ?: boolean ;
56
56
57
+ /**
58
+ * sort data contracts in alphabetical order
59
+ */
60
+ sortTypes ?: boolean ;
61
+
57
62
/**
58
63
* generate js api module with declaration file (default: false)
59
64
*/
@@ -139,20 +144,28 @@ interface GenerateApiParamsBase {
139
144
140
145
/** extract all enums from nested types\interfaces to `enum` construction */
141
146
extractEnums ?: boolean ;
147
+
142
148
/** prefix string value needed to fix invalid type names (default: 'Type') */
143
149
fixInvalidTypeNamePrefix ?: string ;
150
+
144
151
/** prefix string value needed to fix invalid enum keys (default: 'Value') */
145
152
fixInvalidEnumKeyPrefix ?: string ;
153
+
146
154
/** prefix string value for enum keys */
147
155
enumKeyPrefix ?: string ;
156
+
148
157
/** suffix string value for enum keys */
149
158
enumKeySuffix ?: string ;
159
+
150
160
/** prefix string value for type names */
151
161
typePrefix ?: string ;
162
+
152
163
/** suffix string value for type names */
153
164
typeSuffix ?: string ;
165
+
154
166
/** extra configuration for extracting type names operations */
155
167
extractingOptions ?: Partial < ExtractingOptions > ;
168
+
156
169
/** configuration for fetching swagger schema requests */
157
170
requestOptions ?: null | Partial < import ( "node-fetch" ) . RequestInit > ;
158
171
}
Original file line number Diff line number Diff line change @@ -292,6 +292,7 @@ const main = async () => {
292
292
apiClassName : options . apiClassName ,
293
293
debug : options . debug ,
294
294
anotherArrayType : options . anotherArrayType ,
295
+ extractEnums : options . extractEnums ,
295
296
} ) ;
296
297
break ;
297
298
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " swagger-typescript-api" ,
3
- "version" : " 12.0.1 " ,
3
+ "version" : " 12.0.2 " ,
4
4
"description" : " Generate typescript/javascript api from swagger schema" ,
5
5
"scripts" : {
6
6
"cli:json" : " node index.js -r -d -p ./swagger-test-cli.json -n swagger-test-cli.ts" ,
You can’t perform that action at this time.
0 commit comments