swagger-axios-codegen
Advanced tools
Comparing version
@@ -0,2 +1,7 @@ | ||
## 0.12.0 | ||
- bugfix | ||
-fix requestBody upload file. | ||
## 0.12.8 | ||
@@ -3,0 +8,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getRequestBody = void 0; | ||
const util_1 = require("util"); | ||
const utils_1 = require("../utils"); | ||
function getRequestBody(requestBody) { | ||
// 如果是空则直接反回 | ||
if ((0, util_1.isNullOrUndefined)(requestBody.content)) | ||
if (!requestBody.content) | ||
return; | ||
@@ -15,6 +14,7 @@ let imports = []; | ||
let reqBody = requestBody.content["application/json"]; | ||
if (reqBody == null) { | ||
reqBody == requestBody.content[allContent[0]]; | ||
console.log("reqBody 1:", !reqBody); | ||
if (!reqBody) { | ||
reqBody = requestBody.content[allContent[0]]; | ||
} | ||
// console.log("reqBody:", JSON.stringify(reqBody)); | ||
console.log("reqBody 2:", reqBody); | ||
if (reqBody == null) { | ||
@@ -21,0 +21,0 @@ return { imports, bodyType }; |
{ | ||
"name": "swagger-axios-codegen", | ||
"version": "0.12.8", | ||
"version": "0.12.9", | ||
"main": "./dist/index", | ||
@@ -5,0 +5,0 @@ "typings": "./dist/", |
Sorry, the diff of this file is not supported yet
199374
0.03%