You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: problem with default http request headers in axios client
* feat: improve type declaration for inline types; fix: nullable option for objects
* fix: problem with sortTypes option; docs: update CHANGELOG
* docs: update README linked with custom templates
* feat: separate data-contracts.ejs onto 4 pieces (enum, interface, type, jsdoc)
* fix createFormData code duplication (#392)
* chore: add title for DC in jsdoc; internal: add templates for future improvements
* fix: problem with host.fileExists is not a function
chore: set all deps as fixed versions
* fix: order of headers in fetch http client
* fix: max file size for axios (fetching swagger file)
* fix: fs.rmSync usage
* fix: getNewLine, readFile in LanguageServicehost (ts)
* docs: add docs for unwrapResponseData flag
* fix: problems with nested required properties based with upper required properties
* chore: refresh test generated schemas
* bump: up version to 10.0.3, update CHANGELOG
* docs: update changelog
Co-authored-by: Oleg Kuzava <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+25-17Lines changed: 25 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,7 @@ generateApi({
107
107
toJS:false,
108
108
extractRequestParams:false,
109
109
extractRequestBody:false,
110
+
unwrapResponseData:false,
110
111
prettier: { // By default prettier config is load from your project
111
112
printWidth:120,
112
113
tabWidth:2,
@@ -145,16 +146,23 @@ generateApi({
145
146
## 💎 options
146
147
### **`--templates`**
147
148
This option needed for cases when you don't want to use the default `swagger-typescript-api` output structure
149
+
You can create custom templates with extensions `.ejs` or `.eta`
148
150
149
151
Templates:
150
-
-`api.eta` - Api class module (locations: [/templates/default](https://github.com/acacode/swagger-typescript-api/tree/next/templates/default/api.eta), [/templates/modular](https://github.com/acacode/swagger-typescript-api/tree/next/templates/modular/api.eta))
151
-
-`data-contracts.eta` - all types (data contracts) from swagger schema (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/data-contracts.eta))
152
-
-`http-client.eta` - HttpClient class module (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/http-client.eta))
153
-
-`procedure-call.eta` - route in Api class (locations: [/templates/default](https://github.com/acacode/swagger-typescript-api/tree/next/templates/default/procedure-call.eta), [/templates/modular](https://github.com/acacode/swagger-typescript-api/tree/next/templates/modular/procedure-call.eta))
154
-
-`route-docs.eta` - documentation for route in Api class (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/route-docs.eta))
155
-
-`route-name.eta` - route name for route in Api class (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/route-name.eta))
-`api.ejs` - *(generates file)* Api class module (locations: [/templates/default](https://github.com/acacode/swagger-typescript-api/tree/next/templates/default/api.ejs), [/templates/modular](https://github.com/acacode/swagger-typescript-api/tree/next/templates/modular/api.ejs))
153
+
-`data-contracts.ejs` - *(generates file)* all types (data contracts) from swagger schema (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/data-contracts.ejs))
154
+
-`http-client.ejs` - *(generates file)* HttpClient class module (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/http-client.ejs))
155
+
-`procedure-call.ejs` - *(subtemplate)* route in Api class (locations: [/templates/default](https://github.com/acacode/swagger-typescript-api/tree/next/templates/default/procedure-call.ejs), [/templates/modular](https://github.com/acacode/swagger-typescript-api/tree/next/templates/modular/procedure-call.ejs))
156
+
-`route-docs.ejs` - *(generates file)* documentation for route in Api class (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/route-docs.ejs))
157
+
-`route-name.ejs` - *(subtemplate)* route name for route in Api class (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/route-name.ejs))
-`data-contract-jsdoc.ejs` - *(subtemplate)* generates JSDOC for data contract (locations: [/templates/base](https://github.com/acacode/swagger-typescript-api/tree/next/templates/base/data-contract-jsdoc.ejs))
0 commit comments