forked from loafle/openapi-generator-original
Merge branch 'develop_2.0' of github.com:swagger-api/swagger-codegen into develop_2.0
This commit is contained in:
commit
a2d2deeb0c
@ -39,9 +39,6 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
apiTemplateFiles.put("api.mustache", ".php");
|
||||
templateDir = "php";
|
||||
|
||||
typeMapping.clear();
|
||||
languageSpecificPrimitives.clear();
|
||||
|
||||
reservedWords = new HashSet<String> (
|
||||
Arrays.asList(
|
||||
"__halt_compiler", "abstract", "and", "array", "as", "break", "callable", "case", "catch", "class", "clone", "const", "continue", "declare", "default", "die", "do", "echo", "else", "elseif", "empty", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", "eval", "exit", "extends", "final", "for", "foreach", "function", "global", "goto", "if", "implements", "include", "include_once", "instanceof", "insteadof", "interface", "isset", "list", "namespace", "new", "or", "print", "private", "protected", "public", "require", "require_once", "return", "static", "switch", "throw", "trait", "try", "unset", "use", "var", "while", "xor")
|
||||
@ -52,18 +49,39 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
additionalProperties.put("artifactId", artifactId);
|
||||
additionalProperties.put("artifactVersion", artifactVersion);
|
||||
|
||||
languageSpecificPrimitives.add("int");
|
||||
languageSpecificPrimitives.add("array");
|
||||
languageSpecificPrimitives.add("map");
|
||||
languageSpecificPrimitives.add("string");
|
||||
languageSpecificPrimitives.add("DateTime");
|
||||
// ref: http://php.net/manual/en/language.types.intro.php
|
||||
languageSpecificPrimitives = new HashSet<String>(
|
||||
Arrays.asList(
|
||||
"boolean",
|
||||
"int",
|
||||
"integer",
|
||||
"double",
|
||||
"float",
|
||||
"string",
|
||||
"object",
|
||||
"DateTime",
|
||||
"mixed",
|
||||
"number")
|
||||
);
|
||||
|
||||
typeMapping.put("long", "int");
|
||||
instantiationTypes.put("array", "array");
|
||||
instantiationTypes.put("map", "map");
|
||||
|
||||
// ref: https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#data-types
|
||||
typeMapping = new HashMap<String, String>();
|
||||
typeMapping.put("integer", "int");
|
||||
typeMapping.put("Array", "array");
|
||||
typeMapping.put("String", "string");
|
||||
typeMapping.put("List", "array");
|
||||
typeMapping.put("long", "int");
|
||||
typeMapping.put("float", "float");
|
||||
typeMapping.put("double", "double");
|
||||
typeMapping.put("string", "string");
|
||||
typeMapping.put("byte", "int");
|
||||
typeMapping.put("boolean", "boolean");
|
||||
typeMapping.put("date", "DateTime");
|
||||
typeMapping.put("datetime", "DateTime");
|
||||
typeMapping.put("file", "string");
|
||||
typeMapping.put("map", "map");
|
||||
typeMapping.put("array", "array");
|
||||
typeMapping.put("list", "array");
|
||||
|
||||
supportingFiles.add(new SupportingFile("composer.mustache", packagePath, "composer.json"));
|
||||
supportingFiles.add(new SupportingFile("APIClient.mustache", packagePath + "/lib", "APIClient.php"));
|
||||
@ -109,12 +127,15 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
if(languageSpecificPrimitives.contains(type)) {
|
||||
return type;
|
||||
}
|
||||
else if (instantiationTypes.containsKey(type)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
else
|
||||
type = swaggerType;
|
||||
if(type == null)
|
||||
return null;
|
||||
return type;
|
||||
return toModelName(type);
|
||||
}
|
||||
|
||||
public String toDefaultValue(Property p) {
|
||||
|
@ -5,6 +5,11 @@ package {{package}}
|
||||
import {{invokerPackage}}.ApiInvoker
|
||||
import {{invokerPackage}}.ApiException
|
||||
|
||||
import com.sun.jersey.multipart.FormDataMultiPart
|
||||
import com.sun.jersey.multipart.file.FileDataBodyPart
|
||||
|
||||
import javax.ws.rs.core.MediaType
|
||||
|
||||
import java.io.File
|
||||
import java.util.Date
|
||||
|
||||
@ -31,18 +36,13 @@ class {{classname}}(val defBasePath: String = "{{basePath}}",
|
||||
|
||||
{{/pathParams}}
|
||||
|
||||
{{newline}}
|
||||
val contentType = {
|
||||
{{#bodyParam}}if({{paramName}} != null && {{paramName}}.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
{{/bodyParam}}
|
||||
{{^bodyParam}}"application/json"{{/bodyParam}}
|
||||
}
|
||||
val contentTypes = List({{#consumes}}"{{mediaType}}", {{/consumes}}"application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
{{#requiredParamCount}}
|
||||
// verify required params are set
|
||||
@ -58,8 +58,25 @@ class {{classname}}(val defBasePath: String = "{{basePath}}",
|
||||
{{#headerParams}}headerParams += "{{baseName}}" -> {{paramName}}
|
||||
{{/headerParams}}
|
||||
|
||||
var postBody: AnyRef = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
{{#formParams}}{{#notFile}}
|
||||
mp.field("{{baseName}}", {{paramName}}.toString(), MediaType.MULTIPART_FORM_DATA_TYPE)
|
||||
{{/notFile}}{{#isFile}}
|
||||
mp.field("{{baseName}}", file.getName)
|
||||
mp.bodyPart(new FileDataBodyPart("{{baseName}}", {{paramName}}, MediaType.MULTIPART_FORM_DATA_TYPE))
|
||||
{{/isFile}}{{/formParams}}
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
{{#formParams}}{{#notFile}}formParams += "{{baseName}}" -> {{paramName}}.toString(){{/notFile}}
|
||||
{{/formParams}}
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "{{httpMethod}}", queryParams.toMap, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}None{{/bodyParam}}, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "{{httpMethod}}", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
{{#returnType}} Some(ApiInvoker.deserialize(s, "{{returnContainer}}", classOf[{{returnBaseType}}]).asInstanceOf[{{returnType}}])
|
||||
{{/returnType}}
|
||||
|
@ -6,6 +6,7 @@ import com.sun.jersey.api.client.config.ClientConfig
|
||||
import com.sun.jersey.api.client.config.DefaultClientConfig
|
||||
import com.sun.jersey.api.client.filter.LoggingFilter
|
||||
|
||||
import com.sun.jersey.core.util.MultivaluedMapImpl
|
||||
import com.sun.jersey.multipart.FormDataMultiPart
|
||||
import com.sun.jersey.multipart.file.FileDataBodyPart
|
||||
|
||||
@ -94,7 +95,7 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
} else null
|
||||
}
|
||||
|
||||
def invokeApi(host: String, path: String, method: String, queryParams: Map[String, String], body: AnyRef, headerParams: Map[String, String], contentType: String): String = {
|
||||
def invokeApi(host: String, path: String, method: String, queryParams: Map[String, String], formParams: Map[String, String], body: AnyRef, headerParams: Map[String, String], contentType: String): String = {
|
||||
val client = getClient(host)
|
||||
|
||||
val querystring = queryParams.filter(k => k._2 != null).map(k => (escape(k._1) + "=" + escape(k._2))).mkString("?", "&", "")
|
||||
@ -106,13 +107,19 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
case false => if (p._2 != null) builder.header(p._1, p._2)
|
||||
}
|
||||
})
|
||||
var formData: MultivaluedMapImpl = null
|
||||
if(contentType == "application/x-www-form-urlencoded") {
|
||||
formData = new MultivaluedMapImpl()
|
||||
formParams.map(p => formData.add(p._1, p._2))
|
||||
}
|
||||
|
||||
val response: ClientResponse = method match {
|
||||
case "GET" => {
|
||||
builder.get(classOf[ClientResponse]).asInstanceOf[ClientResponse]
|
||||
}
|
||||
case "POST" => {
|
||||
if(body != null && body.isInstanceOf[File]) {
|
||||
if(formData != null) builder.post(classOf[ClientResponse], formData)
|
||||
else if(body != null && body.isInstanceOf[File]) {
|
||||
val file = body.asInstanceOf[File]
|
||||
val form = new FormDataMultiPart()
|
||||
form.field("filename", file.getName())
|
||||
@ -125,7 +132,8 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
}
|
||||
}
|
||||
case "PUT" => {
|
||||
if(body == null) builder.put(classOf[ClientResponse], null)
|
||||
if(formData != null) builder.post(classOf[ClientResponse], formData)
|
||||
else if(body == null) builder.put(classOf[ClientResponse], null)
|
||||
else builder.`type`(contentType).put(classOf[ClientResponse], serialize(body))
|
||||
}
|
||||
case "DELETE" => {
|
||||
|
@ -217,8 +217,9 @@ class PhpModelTest extends FlatSpec with Matchers {
|
||||
cm.classname should be ("Sample")
|
||||
cm.description should be ("an array model")
|
||||
cm.vars.size should be (0)
|
||||
cm.imports.size should be (1)
|
||||
(cm.imports.asScala.toSet & Set("Children")).size should be (1)
|
||||
// skip import test as import is not used by PHP codegen
|
||||
//cm.imports.size should be (1)
|
||||
//(cm.imports.asScala.toSet & Set("Children")).size should be (1)
|
||||
}
|
||||
|
||||
it should "convert an map model" in {
|
||||
@ -237,23 +238,25 @@ class PhpModelTest extends FlatSpec with Matchers {
|
||||
(cm.imports.asScala.toSet & Set("Children")).size should be (1)
|
||||
}
|
||||
|
||||
it should "create proper imports per #316" in {
|
||||
val model = new SwaggerParser()
|
||||
.read("src/test/resources/2_0/postBodyTest.json")
|
||||
val codegen = new PhpClientCodegen()
|
||||
// skip import test as import is not used by PHP codegen
|
||||
//it should "create proper imports per #316" in {
|
||||
// val model = new SwaggerParser()
|
||||
// .read("src/test/resources/2_0/postBodyTest.json")
|
||||
// val codegen = new PhpClientCodegen()
|
||||
|
||||
val animalPaths = model.getPaths()
|
||||
val animalOps = animalPaths.get("/animals")
|
||||
animalOps.getPost() should not be (null)
|
||||
val animalCo = codegen.fromOperation("/animals", "POST", animalOps.getPost(), model.getDefinitions())
|
||||
animalCo.imports.size should be (1)
|
||||
animalCo.imports.contains("Animal") should equal (true)
|
||||
// val animalPaths = model.getPaths()
|
||||
// val animalOps = animalPaths.get("/animals")
|
||||
// animalOps.getPost() should not be (null)
|
||||
// val animalCo = codegen.fromOperation("/animals", "POST", animalOps.getPost(), model.getDefinitions())
|
||||
// animalCo.imports should be (1)
|
||||
// animalCo.imports.size should be (1)
|
||||
// animalCo.imports.contains("Animal") should equal (true)
|
||||
|
||||
val insectPaths = model.getPaths()
|
||||
val insectOps = insectPaths.get("/insects")
|
||||
insectOps.getPost() should not be (null)
|
||||
val insectCo = codegen.fromOperation("/insects", "POST", insectOps.getPost(), model.getDefinitions())
|
||||
insectCo.imports.size should be (1)
|
||||
insectCo.imports.contains("Insect") should equal (true)
|
||||
}
|
||||
// val insectPaths = model.getPaths()
|
||||
// val insectOps = insectPaths.get("/insects")
|
||||
// insectOps.getPost() should not be (null)
|
||||
// val insectCo = codegen.fromOperation("/insects", "POST", insectOps.getPost(), model.getDefinitions())
|
||||
// insectCo.imports.size should be (1)
|
||||
// insectCo.imports.contains("Insect") should equal (true)
|
||||
//}
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ class PetApi {
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (required)
|
||||
* @param file $file file to upload (required)
|
||||
* @param string $file file to upload (required)
|
||||
* @return void
|
||||
*/
|
||||
public function uploadFile($pet_id, $additional_metadata, $file) {
|
||||
|
@ -6,6 +6,7 @@ import com.sun.jersey.api.client.config.ClientConfig
|
||||
import com.sun.jersey.api.client.config.DefaultClientConfig
|
||||
import com.sun.jersey.api.client.filter.LoggingFilter
|
||||
|
||||
import com.sun.jersey.core.util.MultivaluedMapImpl
|
||||
import com.sun.jersey.multipart.FormDataMultiPart
|
||||
import com.sun.jersey.multipart.file.FileDataBodyPart
|
||||
|
||||
@ -94,7 +95,7 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
} else null
|
||||
}
|
||||
|
||||
def invokeApi(host: String, path: String, method: String, queryParams: Map[String, String], body: AnyRef, headerParams: Map[String, String], contentType: String): String = {
|
||||
def invokeApi(host: String, path: String, method: String, queryParams: Map[String, String], formParams: Map[String, String], body: AnyRef, headerParams: Map[String, String], contentType: String): String = {
|
||||
val client = getClient(host)
|
||||
|
||||
val querystring = queryParams.filter(k => k._2 != null).map(k => (escape(k._1) + "=" + escape(k._2))).mkString("?", "&", "")
|
||||
@ -106,13 +107,19 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
case false => if (p._2 != null) builder.header(p._1, p._2)
|
||||
}
|
||||
})
|
||||
var formData: MultivaluedMapImpl = null
|
||||
if(contentType == "application/x-www-form-urlencoded") {
|
||||
formData = new MultivaluedMapImpl()
|
||||
formParams.map(p => formData.add(p._1, p._2))
|
||||
}
|
||||
|
||||
val response: ClientResponse = method match {
|
||||
case "GET" => {
|
||||
builder.get(classOf[ClientResponse]).asInstanceOf[ClientResponse]
|
||||
}
|
||||
case "POST" => {
|
||||
if(body != null && body.isInstanceOf[File]) {
|
||||
if(formData != null) builder.post(classOf[ClientResponse], formData)
|
||||
else if(body != null && body.isInstanceOf[File]) {
|
||||
val file = body.asInstanceOf[File]
|
||||
val form = new FormDataMultiPart()
|
||||
form.field("filename", file.getName())
|
||||
@ -125,7 +132,8 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
}
|
||||
}
|
||||
case "PUT" => {
|
||||
if(body == null) builder.put(classOf[ClientResponse], null)
|
||||
if(formData != null) builder.post(classOf[ClientResponse], formData)
|
||||
else if(body == null) builder.put(classOf[ClientResponse], null)
|
||||
else builder.`type`(contentType).put(classOf[ClientResponse], serialize(body))
|
||||
}
|
||||
case "DELETE" => {
|
||||
|
@ -5,6 +5,11 @@ import java.io.File
|
||||
import io.swagger.client.ApiInvoker
|
||||
import io.swagger.client.ApiException
|
||||
|
||||
import com.sun.jersey.multipart.FormDataMultiPart
|
||||
import com.sun.jersey.multipart.file.FileDataBodyPart
|
||||
|
||||
import javax.ws.rs.core.MediaType
|
||||
|
||||
import java.io.File
|
||||
import java.util.Date
|
||||
|
||||
@ -28,18 +33,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/pet".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
if(body != null && body.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
|
||||
|
||||
}
|
||||
val contentTypes = List("application/json", "application/xml", "application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -47,8 +47,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = body
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, body, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -69,18 +80,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/pet".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
if(body != null && body.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
|
||||
|
||||
}
|
||||
val contentTypes = List("application/json", "application/xml", "application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -88,8 +94,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = body
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, body, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -110,15 +127,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -127,8 +142,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]])
|
||||
|
||||
@ -150,15 +176,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/pet/findByTags".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -167,8 +191,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]])
|
||||
|
||||
@ -192,15 +227,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -208,8 +241,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "", classOf[Pet]).asInstanceOf[Pet])
|
||||
|
||||
@ -235,15 +279,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/x-www-form-urlencoded", "application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -251,8 +293,25 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
mp.field("name", name.toString(), MediaType.MULTIPART_FORM_DATA_TYPE)
|
||||
|
||||
mp.field("status", status.toString(), MediaType.MULTIPART_FORM_DATA_TYPE)
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
formParams += "name" -> name.toString()
|
||||
formParams += "status" -> status.toString()
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -276,15 +335,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -293,8 +350,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
headerParams += "api_key" -> api_key
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -319,15 +387,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("multipart/form-data", "application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -335,8 +401,26 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
mp.field("additionalMetadata", additionalMetadata.toString(), MediaType.MULTIPART_FORM_DATA_TYPE)
|
||||
|
||||
mp.field("file", file.getName)
|
||||
mp.bodyPart(new FileDataBodyPart("file", file, MediaType.MULTIPART_FORM_DATA_TYPE))
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
formParams += "additionalMetadata" -> additionalMetadata.toString()
|
||||
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
|
@ -4,6 +4,11 @@ import io.swagger.client.model.Order
|
||||
import io.swagger.client.ApiInvoker
|
||||
import io.swagger.client.ApiException
|
||||
|
||||
import com.sun.jersey.multipart.FormDataMultiPart
|
||||
import com.sun.jersey.multipart.file.FileDataBodyPart
|
||||
|
||||
import javax.ws.rs.core.MediaType
|
||||
|
||||
import java.io.File
|
||||
import java.util.Date
|
||||
|
||||
@ -26,15 +31,13 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/store/inventory".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -42,8 +45,19 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "map", classOf[Integer]).asInstanceOf[Map[String, Integer]])
|
||||
|
||||
@ -65,18 +79,13 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/store/order".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
if(body != null && body.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
|
||||
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -84,8 +93,19 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = body
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, body, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order])
|
||||
|
||||
@ -109,15 +129,13 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -125,8 +143,19 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order])
|
||||
|
||||
@ -150,15 +179,13 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -166,8 +193,19 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
|
@ -4,6 +4,11 @@ import io.swagger.client.model.User
|
||||
import io.swagger.client.ApiInvoker
|
||||
import io.swagger.client.ApiException
|
||||
|
||||
import com.sun.jersey.multipart.FormDataMultiPart
|
||||
import com.sun.jersey.multipart.file.FileDataBodyPart
|
||||
|
||||
import javax.ws.rs.core.MediaType
|
||||
|
||||
import java.io.File
|
||||
import java.util.Date
|
||||
|
||||
@ -27,18 +32,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/user".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
if(body != null && body.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
|
||||
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -46,8 +46,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = body
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, body, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -68,18 +79,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/user/createWithArray".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
if(body != null && body.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
|
||||
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -87,8 +93,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = body
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, body, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -109,18 +126,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/user/createWithList".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
if(body != null && body.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
|
||||
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -128,8 +140,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = body
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, body, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -151,15 +174,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/user/login".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -169,8 +190,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String])
|
||||
|
||||
@ -191,15 +223,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
// create path and map variables
|
||||
val path = "/user/logout".replaceAll("\\{format\\}","json")
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -207,8 +237,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -231,15 +272,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -247,8 +286,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
Some(ApiInvoker.deserialize(s, "", classOf[User]).asInstanceOf[User])
|
||||
|
||||
@ -273,18 +323,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
if(body != null && body.isInstanceOf[File] )
|
||||
"multipart/form-data"
|
||||
else "application/json"
|
||||
|
||||
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -292,8 +337,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = body
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, body, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
@ -316,15 +372,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
|
||||
val contentType = {
|
||||
|
||||
"application/json"
|
||||
}
|
||||
val contentTypes = List("application/json")
|
||||
val contentType = contentTypes(0)
|
||||
|
||||
// query params
|
||||
val queryParams = new HashMap[String, String]
|
||||
val headerParams = new HashMap[String, String]
|
||||
val formParams = new HashMap[String, String]
|
||||
|
||||
|
||||
|
||||
@ -332,8 +386,19 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
|
||||
|
||||
|
||||
var postBody: AnyRef = null
|
||||
|
||||
if(contentType.startsWith("multipart/form-data")) {
|
||||
val mp = new FormDataMultiPart()
|
||||
|
||||
postBody = mp
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, None, headerParams.toMap, contentType) match {
|
||||
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
|
||||
case s: String =>
|
||||
|
||||
case _ => None
|
||||
|
Loading…
x
Reference in New Issue
Block a user