swagger-axios-codegen
Advanced tools
Comparing version 0.2.12 to 0.2.13
@@ -0,1 +1,6 @@ | ||
## 0.2.13 | ||
- Upgrade [example](./example),adding an [demo](./example/swagger.operationId.json) of using 'operationId' as the method name | ||
- Fix the exception of definition "let data = null" in the request mothod when using Typescript3.0.0 ([b0dad90](https://github.com/Manweill/swagger-axios-codegen/commit/b0dad90d96e3c9d6c4f033c6ad8adcf4c1bf0b2d) by [kt81](https://github.com/Manweill/swagger-axios-codegen/commits?author=kt81)) | ||
## 0.2.12 | ||
@@ -2,0 +7,0 @@ |
@@ -0,1 +1,6 @@ | ||
## 0.2.13 | ||
- 更新[example](./example/swagger.operationId.json),增加使用operationId作为方法名字的例子 | ||
- 修复使用Typescript3.0.0,在请求方法中的 `let data = null;` 的定义会报异常 ([b0dad90](https://github.com/Manweill/swagger-axios-codegen/commit/b0dad90d96e3c9d6c4f033c6ad8adcf4c1bf0b2d) by [kt81](https://github.com/Manweill/swagger-axios-codegen/commits?author=kt81)) | ||
## 0.2.12 | ||
@@ -2,0 +7,0 @@ |
@@ -135,6 +135,5 @@ "use strict"; | ||
let data = null; | ||
${parsedParameters && parsedParameters.bodyParameters.length > 0 | ||
? 'data = {' + parsedParameters.bodyParameters.join(',') + '}' | ||
: ''}; | ||
let data = ${parsedParameters && parsedParameters.bodyParameters.length > 0 | ||
? '{' + parsedParameters.bodyParameters.join(',') + '}' | ||
: 'null'}; | ||
@@ -141,0 +140,0 @@ ${contentType === 'multipart/form-data' ? formData : ''} |
{ | ||
"name": "swagger-axios-codegen", | ||
"version": "0.2.12", | ||
"version": "0.2.13", | ||
"main": "./dist/index", | ||
@@ -5,0 +5,0 @@ "typings": "./dist/", |
@@ -68,3 +68,3 @@ # swagger-axios-codegen | ||
``` | ||
```js | ||
codegen({ | ||
@@ -82,3 +82,3 @@ methodNameMode: 'operationId', | ||
``` | ||
```js | ||
@@ -93,3 +93,3 @@ import { UserService } from './service' | ||
``` | ||
```js | ||
@@ -96,0 +96,0 @@ import { UserService } from './service' |
35047
21
577