replace requiredParam with reuqired

This commit is contained in:
wing328
2016-04-15 22:54:46 +08:00
parent 35144b2c1d
commit 87e542c69c
47 changed files with 1537 additions and 1442 deletions

View File

@@ -40,6 +40,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -80,6 +85,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -123,6 +133,16 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List( // verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
).filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
headerParams += "api_key" -> apiKey
@@ -164,6 +184,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
@@ -206,6 +231,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
if(String.valueOf(tags) != "null") queryParams += "tags" -> tags.toString
@@ -250,6 +280,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -293,6 +328,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -336,6 +376,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -377,6 +422,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -421,6 +471,21 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List( // verify required params are set
(List( // verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
).filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
).filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -471,6 +536,21 @@ formParams += "status" -> status.toString()
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List( // verify required params are set
(List( // verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
).filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
).filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}

View File

@@ -40,6 +40,11 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -80,6 +85,11 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
@@ -204,6 +214,11 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -245,6 +260,11 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}

View File

@@ -38,6 +38,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -78,6 +83,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -118,6 +128,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -160,6 +175,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -202,6 +222,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
@@ -244,6 +269,16 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List( // verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
).filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
if(String.valueOf(username) != "null") queryParams += "username" -> username.toString
if(String.valueOf(password) != "null") queryParams += "password" -> password.toString
@@ -329,6 +364,16 @@ if(String.valueOf(password) != "null") queryParams += "password" -> password.toS
val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String]
// verify required params are set
(List( // verify required params are set
(List().filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}
).filter(_ != null)).size match {
case => // all required values set
case _ => throw new Exception("missing required params")
}