fix requireParameterCount in scala

This commit is contained in:
wing328
2016-04-16 00:09:15 +08:00
parent c317f99466
commit 79decc53a1
16 changed files with 138 additions and 579 deletions

View File

@@ -1,7 +1,7 @@
package io.swagger.client.api
import io.swagger.client.model.Pet
import io.swagger.client.model.InlineResponse200
import io.swagger.client.model.ApiResponse
import java.io.File
import io.swagger.client.ApiInvoker
import io.swagger.client.ApiException
@@ -26,7 +26,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store
* @return void
*/
def addPet (body: Pet) = {
@@ -40,6 +40,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (body == null) throw new Exception("Missing required parameter 'body' when calling PetApi->addPet")
@@ -51,7 +52,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -63,46 +64,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
* @param body Pet object in the form of byte array (optional)
* @return void
*/
def addPetUsingByteArray (body: String) = {
// create path and map variables
val path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","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]
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, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex
}
}
/**
* Deletes a pet
*
@@ -123,8 +85,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (petId == null) throw new Exception("Missing required parameter 'petId' when calling PetApi->deletePet")
headerParams += "api_key" -> apiKey
@@ -136,7 +96,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -148,13 +108,14 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for query (optional, default to available)
* @param status Status values that need to be considered for filter
* @return List[Pet]
*/
def findPetsByStatus (status: List[String] /* = available */) : Option[List[Pet]] = {
def findPetsByStatus (status: List[String]) : Option[List[Pet]] = {
// create path and map variables
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
@@ -165,6 +126,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (status == null) throw new Exception("Missing required parameter 'status' when calling PetApi->findPetsByStatus")
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
@@ -177,7 +139,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -190,10 +152,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (optional)
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
* @return List[Pet]
*/
def findPetsByTags (tags: List[String]) : Option[List[Pet]] = {
@@ -207,6 +170,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (tags == null) throw new Exception("Missing required parameter 'tags' when calling PetApi->findPetsByTags")
if(String.valueOf(tags) != "null") queryParams += "tags" -> tags.toString
@@ -219,7 +183,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -232,10 +196,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Find pet by ID
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
* @return Pet
*/
def getPetById (petId: Long) : Option[Pet] = {
@@ -251,8 +216,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (petId == null) throw new Exception("Missing required parameter 'petId' when calling PetApi->getPetById")
var postBody: AnyRef = null
@@ -263,7 +226,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -276,98 +239,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* @return InlineResponse200
*/
def getPetByIdInObject (petId: Long) : Option[InlineResponse200] = {
// create path and map variables
val path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
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]
if (petId == null) throw new Exception("Missing required parameter 'petId' when calling PetApi->getPetByIdInObject")
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, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[InlineResponse200]).asInstanceOf[InlineResponse200])
case _ => None
}
} catch {
case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex
}
}
/**
* Fake endpoint to test byte array return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* @return String
*/
def petPetIdtestingByteArraytrueGet (petId: Long) : Option[String] = {
// create path and map variables
val path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
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]
if (petId == null) throw new Exception("Missing required parameter 'petId' when calling PetApi->petPetIdtestingByteArraytrueGet")
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, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String])
case _ => None
}
} catch {
case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex
}
}
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store
* @return void
*/
def updatePet (body: Pet) = {
@@ -381,6 +257,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (body == null) throw new Exception("Missing required parameter 'body' when calling PetApi->updatePet")
@@ -392,7 +269,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -404,6 +281,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Updates a pet in the store with form data
*
@@ -412,7 +290,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
* @param status Updated status of the pet (optional)
* @return void
*/
def updatePetWithForm (petId: String, name: String, status: String) = {
def updatePetWithForm (petId: Long, name: String, status: String) = {
// create path and map variables
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
@@ -425,8 +303,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (petId == null) throw new Exception("Missing required parameter 'petId' when calling PetApi->updatePetWithForm")
var postBody: AnyRef = null
@@ -442,7 +318,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
}
else {
formParams += "name" -> name.toString()
formParams += "status" -> status.toString()
formParams += "status" -> status.toString()
}
try {
@@ -455,15 +331,16 @@ formParams += "status" -> status.toString()
case ex: ApiException => throw ex
}
}
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return void
* @return ApiResponse
*/
def uploadFile (petId: Long, additionalMetadata: String, file: File) = {
def uploadFile (petId: Long, additionalMetadata: String, file: File) : Option[ApiResponse] = {
// create path and map variables
val path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
@@ -476,8 +353,6 @@ formParams += "status" -> status.toString()
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (petId == null) throw new Exception("Missing required parameter 'petId' when calling PetApi->uploadFile")
var postBody: AnyRef = null
@@ -494,17 +369,19 @@ formParams += "status" -> status.toString()
}
else {
formParams += "additionalMetadata" -> additionalMetadata.toString()
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
Some(ApiInvoker.deserialize(s, "", classOf[ApiResponse]).asInstanceOf[ApiResponse])
case _ => None
}
} catch {
case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex
}
}
}

View File

@@ -40,8 +40,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (orderId == null) throw new Exception("Missing required parameter 'orderId' when calling StoreApi->deleteOrder")
var postBody: AnyRef = null
@@ -52,7 +50,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -64,48 +62,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Finds orders by status
* A single status value can be provided as a string
* @param status Status value that needs to be considered for query (optional, default to placed)
* @return List[Order]
*/
def findOrdersByStatus (status: String /* = placed */) : Option[List[Order]] = {
// create path and map variables
val path = "/store/findByStatus".replaceAll("\\{format\\}","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]
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
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, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "array", classOf[Order]).asInstanceOf[List[Order]])
case _ => None
}
} catch {
case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex
}
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@@ -122,7 +79,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
var postBody: AnyRef = null
@@ -133,7 +89,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -146,53 +102,14 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Fake endpoint to test arbitrary object return by 'Get inventory'
* Returns an arbitrary object which is actually a map of status codes to quantities
* @return Any
*/
def getInventoryInObject () : Option[Any] = {
// create path and map variables
val path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","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]
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, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Any]).asInstanceOf[Any])
case _ => None
}
} catch {
case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex
}
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
* @return Order
*/
def getOrderById (orderId: String) : Option[Order] = {
def getOrderById (orderId: Long) : Option[Order] = {
// create path and map variables
val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId))
@@ -205,8 +122,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (orderId == null) throw new Exception("Missing required parameter 'orderId' when calling StoreApi->getOrderById")
var postBody: AnyRef = null
@@ -217,7 +132,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -230,10 +145,11 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (optional)
* @param body order placed for purchasing the pet
* @return Order
*/
def placeOrder (body: Order) : Option[Order] = {
@@ -247,6 +163,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (body == null) throw new Exception("Missing required parameter 'body' when calling StoreApi->placeOrder")
@@ -258,7 +175,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -271,4 +188,5 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
}

View File

@@ -24,7 +24,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (optional)
* @param body Created user object
* @return void
*/
def createUser (body: User) = {
@@ -38,6 +38,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->createUser")
@@ -49,7 +50,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -61,10 +62,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object
* @return void
*/
def createUsersWithArrayInput (body: List[User]) = {
@@ -78,6 +80,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->createUsersWithArrayInput")
@@ -89,7 +92,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -101,10 +104,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object
* @return void
*/
def createUsersWithListInput (body: List[User]) = {
@@ -118,6 +122,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->createUsersWithListInput")
@@ -129,7 +134,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -141,6 +146,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Delete user
* This can only be done by the logged in user.
@@ -160,8 +166,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->deleteUser")
var postBody: AnyRef = null
@@ -172,7 +176,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -184,6 +188,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Get user by user name
*
@@ -203,8 +208,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->getUserByName")
var postBody: AnyRef = null
@@ -215,7 +218,7 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -228,11 +231,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Logs user into the system
*
* @param username The user name for login (optional)
* @param password The password for login in clear text (optional)
* @param username The user name for login
* @param password The password for login in clear text
* @return String
*/
def loginUser (username: String, password: String) : Option[String] = {
@@ -246,7 +250,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if(String.valueOf(username) != "null") queryParams += "username" -> username.toString
if(String.valueOf(password) != "null") queryParams += "password" -> password.toString
@@ -259,7 +262,7 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -272,6 +275,7 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
case ex: ApiException => throw ex
}
}
/**
* Logs out current logged in user session
*
@@ -288,7 +292,6 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
var postBody: AnyRef = null
@@ -299,7 +302,7 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -311,11 +314,12 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
case ex: ApiException => throw ex
}
}
/**
* Updated user
* This can only be done by the logged in user.
* @param username name that need to be deleted
* @param body Updated user object (optional)
* @param body Updated user object
* @return void
*/
def updateUser (username: String, body: User) = {
@@ -331,7 +335,7 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->updateUser")
if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->updateUser")
@@ -343,7 +347,7 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
postBody = mp
}
else {
}
}
try {
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
@@ -355,4 +359,5 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
case ex: ApiException => throw ex
}
}
}

View File

@@ -1,13 +0,0 @@
package io.swagger.client.model
case class InlineResponse200 (
tags: List[Tag],
id: Long,
category: Any,
/* pet status in the store */
status: String,
name: String,
photoUrls: List[String])

View File

@@ -1,7 +0,0 @@
package io.swagger.client.model
case class Model200Response (
name: Integer)

View File

@@ -1,7 +0,0 @@
package io.swagger.client.model
case class ModelReturn (
_return: Integer)

View File

@@ -1,8 +0,0 @@
package io.swagger.client.model
case class Name (
name: Integer,
snakeCase: Integer)

View File

@@ -1,7 +0,0 @@
package io.swagger.client.model
case class SpecialModelName (
specialPropertyName: Long)