Merge pull request #111 from RobBlairInq/issues/67

Issues/67 - generate expected exceptions in java templates when parameters are missing
This commit is contained in:
Tony Tam 2013-12-04 23:32:11 -08:00
commit 773fb89acb
14 changed files with 261 additions and 259 deletions

View File

@ -1,5 +1,7 @@
val version = scala.util.Properties.scalaPropOrElse("version.number", "unknown").toString match { val version = scala.util.Properties.scalaPropOrElse("version.number", "unknown").toString match {
case "2.10.0" => "2.10" case "2.10.0" => "2.10"
case "2.10.2" => "2.10"
case "2.10.3" => "2.10"
case e: String => e case e: String => e
} }
println(version) println(version)

View File

@ -27,6 +27,10 @@ public class PetApi {
} }
public Pet getPetById (Long petId) throws ApiException { public Pet getPetById (Long petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -34,10 +38,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -58,6 +58,10 @@ public class PetApi {
} }
} }
public void deletePet (String petId) throws ApiException { public void deletePet (String petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -65,10 +69,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -89,6 +89,10 @@ public class PetApi {
} }
} }
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException { public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
// verify required params are set
if(petId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -96,10 +100,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -120,6 +120,10 @@ public class PetApi {
} }
} }
public void updatePetWithForm (String petId, String name, String status) throws ApiException { public void updatePetWithForm (String petId, String name, String status) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -127,10 +131,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -178,6 +178,10 @@ public class PetApi {
} }
} }
public void addPet (Pet body) throws ApiException { public void addPet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet".replaceAll("\\{format\\}","json"); String path = "/pet".replaceAll("\\{format\\}","json");
@ -185,10 +189,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -209,6 +209,10 @@ public class PetApi {
} }
} }
public void updatePet (Pet body) throws ApiException { public void updatePet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet".replaceAll("\\{format\\}","json"); String path = "/pet".replaceAll("\\{format\\}","json");
@ -216,10 +220,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -240,6 +240,10 @@ public class PetApi {
} }
} }
public List<Pet> findPetsByStatus (String status) throws ApiException { public List<Pet> findPetsByStatus (String status) throws ApiException {
// verify required params are set
if(status == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json"); String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
@ -247,10 +251,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(status == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(status))) if(!"null".equals(String.valueOf(status)))
queryParams.put("status", String.valueOf(status)); queryParams.put("status", String.valueOf(status));
String contentType = "application/json"; String contentType = "application/json";
@ -273,6 +273,10 @@ public class PetApi {
} }
} }
public List<Pet> findPetsByTags (String tags) throws ApiException { public List<Pet> findPetsByTags (String tags) throws ApiException {
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/findByTags".replaceAll("\\{format\\}","json"); String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
@ -280,10 +284,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(tags))) if(!"null".equals(String.valueOf(tags)))
queryParams.put("tags", String.valueOf(tags)); queryParams.put("tags", String.valueOf(tags));
String contentType = "application/json"; String contentType = "application/json";

View File

@ -26,6 +26,10 @@ public class StoreApi {
} }
public Order getOrderById (String orderId) throws ApiException { public Order getOrderById (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
@ -33,10 +37,6 @@ public class StoreApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -57,6 +57,10 @@ public class StoreApi {
} }
} }
public void deleteOrder (String orderId) throws ApiException { public void deleteOrder (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
@ -64,10 +68,6 @@ public class StoreApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -88,6 +88,10 @@ public class StoreApi {
} }
} }
public void placeOrder (Order body) throws ApiException { public void placeOrder (Order body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/store/order".replaceAll("\\{format\\}","json"); String path = "/store/order".replaceAll("\\{format\\}","json");
@ -95,10 +99,6 @@ public class StoreApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {

View File

@ -26,6 +26,10 @@ public class UserApi {
} }
public void createUser (User body) throws ApiException { public void createUser (User body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user".replaceAll("\\{format\\}","json"); String path = "/user".replaceAll("\\{format\\}","json");
@ -33,10 +37,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -57,6 +57,10 @@ public class UserApi {
} }
} }
public void createUsersWithArrayInput (List<User> body) throws ApiException { public void createUsersWithArrayInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/createWithArray".replaceAll("\\{format\\}","json"); String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
@ -64,10 +68,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -88,6 +88,10 @@ public class UserApi {
} }
} }
public void createUsersWithListInput (List<User> body) throws ApiException { public void createUsersWithListInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/createWithList".replaceAll("\\{format\\}","json"); String path = "/user/createWithList".replaceAll("\\{format\\}","json");
@ -95,10 +99,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -119,6 +119,10 @@ public class UserApi {
} }
} }
public void updateUser (String username, User body) throws ApiException { public void updateUser (String username, User body) throws ApiException {
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -126,10 +130,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -150,6 +150,10 @@ public class UserApi {
} }
} }
public void deleteUser (String username) throws ApiException { public void deleteUser (String username) throws ApiException {
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -157,10 +161,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -181,6 +181,10 @@ public class UserApi {
} }
} }
public User getUserByName (String username) throws ApiException { public User getUserByName (String username) throws ApiException {
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -188,10 +192,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -212,6 +212,10 @@ public class UserApi {
} }
} }
public String loginUser (String username, String password) throws ApiException { public String loginUser (String username, String password) throws ApiException {
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/login".replaceAll("\\{format\\}","json"); String path = "/user/login".replaceAll("\\{format\\}","json");
@ -219,10 +223,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(username))) if(!"null".equals(String.valueOf(username)))
queryParams.put("username", String.valueOf(username)); queryParams.put("username", String.valueOf(username));
if(!"null".equals(String.valueOf(password))) if(!"null".equals(String.valueOf(password)))

View File

@ -23,6 +23,10 @@ public class PetApi {
} }
public Pet getPetById (Long petId) throws ApiException { public Pet getPetById (Long petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -30,10 +34,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -54,6 +54,10 @@ public class PetApi {
} }
} }
public void deletePet (String petId) throws ApiException { public void deletePet (String petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -61,10 +65,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -85,6 +85,10 @@ public class PetApi {
} }
} }
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException { public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
// verify required params are set
if(petId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -92,10 +96,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -116,6 +116,10 @@ public class PetApi {
} }
} }
public void updatePetWithForm (String petId, String name, String status) throws ApiException { public void updatePetWithForm (String petId, String name, String status) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
@ -123,10 +127,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -174,6 +174,10 @@ public class PetApi {
} }
} }
public void addPet (Pet body) throws ApiException { public void addPet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet".replaceAll("\\{format\\}","json"); String path = "/pet".replaceAll("\\{format\\}","json");
@ -181,10 +185,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -205,6 +205,10 @@ public class PetApi {
} }
} }
public void updatePet (Pet body) throws ApiException { public void updatePet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet".replaceAll("\\{format\\}","json"); String path = "/pet".replaceAll("\\{format\\}","json");
@ -212,10 +216,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -236,6 +236,10 @@ public class PetApi {
} }
} }
public List<Pet> findPetsByStatus (String status) throws ApiException { public List<Pet> findPetsByStatus (String status) throws ApiException {
// verify required params are set
if(status == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json"); String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
@ -243,10 +247,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(status == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(status))) if(!"null".equals(String.valueOf(status)))
queryParams.put("status", String.valueOf(status)); queryParams.put("status", String.valueOf(status));
String contentType = "application/json"; String contentType = "application/json";
@ -269,6 +269,10 @@ public class PetApi {
} }
} }
public List<Pet> findPetsByTags (String tags) throws ApiException { public List<Pet> findPetsByTags (String tags) throws ApiException {
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/pet/findByTags".replaceAll("\\{format\\}","json"); String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
@ -276,10 +280,6 @@ public class PetApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(tags))) if(!"null".equals(String.valueOf(tags)))
queryParams.put("tags", String.valueOf(tags)); queryParams.put("tags", String.valueOf(tags));
String contentType = "application/json"; String contentType = "application/json";

View File

@ -22,6 +22,10 @@ public class StoreApi {
} }
public Order getOrderById (String orderId) throws ApiException { public Order getOrderById (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
@ -29,10 +33,6 @@ public class StoreApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -53,6 +53,10 @@ public class StoreApi {
} }
} }
public void deleteOrder (String orderId) throws ApiException { public void deleteOrder (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
@ -60,10 +64,6 @@ public class StoreApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -84,6 +84,10 @@ public class StoreApi {
} }
} }
public void placeOrder (Order body) throws ApiException { public void placeOrder (Order body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/store/order".replaceAll("\\{format\\}","json"); String path = "/store/order".replaceAll("\\{format\\}","json");
@ -91,10 +95,6 @@ public class StoreApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {

View File

@ -22,6 +22,10 @@ public class UserApi {
} }
public void createUser (User body) throws ApiException { public void createUser (User body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user".replaceAll("\\{format\\}","json"); String path = "/user".replaceAll("\\{format\\}","json");
@ -29,10 +33,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -53,6 +53,10 @@ public class UserApi {
} }
} }
public void createUsersWithArrayInput (List<User> body) throws ApiException { public void createUsersWithArrayInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/createWithArray".replaceAll("\\{format\\}","json"); String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
@ -60,10 +64,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -84,6 +84,10 @@ public class UserApi {
} }
} }
public void createUsersWithListInput (List<User> body) throws ApiException { public void createUsersWithListInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/createWithList".replaceAll("\\{format\\}","json"); String path = "/user/createWithList".replaceAll("\\{format\\}","json");
@ -91,10 +95,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -115,6 +115,10 @@ public class UserApi {
} }
} }
public void updateUser (String username, User body) throws ApiException { public void updateUser (String username, User body) throws ApiException {
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -122,10 +126,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -146,6 +146,10 @@ public class UserApi {
} }
} }
public void deleteUser (String username) throws ApiException { public void deleteUser (String username) throws ApiException {
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -153,10 +157,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -177,6 +177,10 @@ public class UserApi {
} }
} }
public User getUserByName (String username) throws ApiException { public User getUserByName (String username) throws ApiException {
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -184,10 +188,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -208,6 +208,10 @@ public class UserApi {
} }
} }
public String loginUser (String username, String password) throws ApiException { public String loginUser (String username, String password) throws ApiException {
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/user/login".replaceAll("\\{format\\}","json"); String path = "/user/login".replaceAll("\\{format\\}","json");
@ -215,10 +219,6 @@ public class UserApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(username))) if(!"null".equals(String.valueOf(username)))
queryParams.put("username", String.valueOf(username)); queryParams.put("username", String.valueOf(username));
if(!"null".equals(String.valueOf(password))) if(!"null".equals(String.valueOf(password)))

View File

@ -25,6 +25,10 @@ public class AccountApi {
} }
public AuthenticationToken authenticate (String username, String password) throws ApiException { public AuthenticationToken authenticate (String username, String password) throws ApiException {
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/account.{format}/authenticate/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/account.{format}/authenticate/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -32,10 +36,6 @@ public class AccountApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(password))) if(!"null".equals(String.valueOf(password)))
queryParams.put("password", String.valueOf(password)); queryParams.put("password", String.valueOf(password));
String contentType = "application/json"; String contentType = "application/json";
@ -58,6 +58,10 @@ public class AccountApi {
} }
} }
public AuthenticationToken authenticatePost (String username, String body) throws ApiException { public AuthenticationToken authenticatePost (String username, String body) throws ApiException {
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/account.{format}/authenticate/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); String path = "/account.{format}/authenticate/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
@ -65,10 +69,6 @@ public class AccountApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {
@ -89,6 +89,10 @@ public class AccountApi {
} }
} }
public List<WordList> getWordListsForLoggedInUser (String auth_token, Integer skip, Integer limit) throws ApiException { public List<WordList> getWordListsForLoggedInUser (String auth_token, Integer skip, Integer limit) throws ApiException {
// verify required params are set
if(auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/account.{format}/wordLists".replaceAll("\\{format\\}","json"); String path = "/account.{format}/wordLists".replaceAll("\\{format\\}","json");
@ -96,10 +100,6 @@ public class AccountApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(auth_token == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(skip))) if(!"null".equals(String.valueOf(skip)))
queryParams.put("skip", String.valueOf(skip)); queryParams.put("skip", String.valueOf(skip));
if(!"null".equals(String.valueOf(limit))) if(!"null".equals(String.valueOf(limit)))
@ -153,6 +153,10 @@ public class AccountApi {
} }
} }
public User getLoggedInUser (String auth_token) throws ApiException { public User getLoggedInUser (String auth_token) throws ApiException {
// verify required params are set
if(auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/account.{format}/user".replaceAll("\\{format\\}","json"); String path = "/account.{format}/user".replaceAll("\\{format\\}","json");
@ -160,10 +164,6 @@ public class AccountApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(auth_token == null ) {
throw new ApiException(400, "missing required params");
}
headerParams.put("auth_token", auth_token); headerParams.put("auth_token", auth_token);
String contentType = "application/json"; String contentType = "application/json";

View File

@ -32,6 +32,10 @@ public class WordApi {
} }
public ExampleSearchResults getExamples (String word, String includeDuplicates, String useCanonical, Integer skip, Integer limit) throws ApiException { public ExampleSearchResults getExamples (String word, String includeDuplicates, String useCanonical, Integer skip, Integer limit) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/examples".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/examples".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -39,10 +43,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(includeDuplicates))) if(!"null".equals(String.valueOf(includeDuplicates)))
queryParams.put("includeDuplicates", String.valueOf(includeDuplicates)); queryParams.put("includeDuplicates", String.valueOf(includeDuplicates));
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
@ -71,6 +71,10 @@ public class WordApi {
} }
} }
public WordObject getWord (String word, String useCanonical, String includeSuggestions) throws ApiException { public WordObject getWord (String word, String useCanonical, String includeSuggestions) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -78,10 +82,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
if(!"null".equals(String.valueOf(includeSuggestions))) if(!"null".equals(String.valueOf(includeSuggestions)))
@ -106,6 +106,10 @@ public class WordApi {
} }
} }
public List<Definition> getDefinitions (String word, String partOfSpeech, String sourceDictionaries, Integer limit, String includeRelated, String useCanonical, String includeTags) throws ApiException { public List<Definition> getDefinitions (String word, String partOfSpeech, String sourceDictionaries, Integer limit, String includeRelated, String useCanonical, String includeTags) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/definitions".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/definitions".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -113,10 +117,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(limit))) if(!"null".equals(String.valueOf(limit)))
queryParams.put("limit", String.valueOf(limit)); queryParams.put("limit", String.valueOf(limit));
if(!"null".equals(String.valueOf(partOfSpeech))) if(!"null".equals(String.valueOf(partOfSpeech)))
@ -149,6 +149,10 @@ public class WordApi {
} }
} }
public Example getTopExample (String word, String useCanonical) throws ApiException { public Example getTopExample (String word, String useCanonical) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/topExample".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/topExample".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -156,10 +160,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
String contentType = "application/json"; String contentType = "application/json";
@ -182,6 +182,10 @@ public class WordApi {
} }
} }
public List<Related> getRelatedWords (String word, String relationshipTypes, String useCanonical, Integer limitPerRelationshipType) throws ApiException { public List<Related> getRelatedWords (String word, String relationshipTypes, String useCanonical, Integer limitPerRelationshipType) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/relatedWords".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/relatedWords".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -189,10 +193,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
if(!"null".equals(String.valueOf(relationshipTypes))) if(!"null".equals(String.valueOf(relationshipTypes)))
@ -219,6 +219,10 @@ public class WordApi {
} }
} }
public List<TextPron> getTextPronunciations (String word, String sourceDictionary, String typeFormat, String useCanonical, Integer limit) throws ApiException { public List<TextPron> getTextPronunciations (String word, String sourceDictionary, String typeFormat, String useCanonical, Integer limit) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/pronunciations".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/pronunciations".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -226,10 +230,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
if(!"null".equals(String.valueOf(sourceDictionary))) if(!"null".equals(String.valueOf(sourceDictionary)))
@ -258,6 +258,10 @@ public class WordApi {
} }
} }
public List<Syllable> getHyphenation (String word, String sourceDictionary, String useCanonical, Integer limit) throws ApiException { public List<Syllable> getHyphenation (String word, String sourceDictionary, String useCanonical, Integer limit) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/hyphenation".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/hyphenation".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -265,10 +269,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
if(!"null".equals(String.valueOf(sourceDictionary))) if(!"null".equals(String.valueOf(sourceDictionary)))
@ -295,6 +295,10 @@ public class WordApi {
} }
} }
public FrequencySummary getWordFrequency (String word, String useCanonical, Integer startYear, Integer endYear) throws ApiException { public FrequencySummary getWordFrequency (String word, String useCanonical, Integer startYear, Integer endYear) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/frequency".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/frequency".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -302,10 +306,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
if(!"null".equals(String.valueOf(startYear))) if(!"null".equals(String.valueOf(startYear)))
@ -332,6 +332,10 @@ public class WordApi {
} }
} }
public List<Bigram> getPhrases (String word, Integer limit, Integer wlmi, String useCanonical) throws ApiException { public List<Bigram> getPhrases (String word, Integer limit, Integer wlmi, String useCanonical) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/phrases".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/phrases".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -339,10 +343,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(limit))) if(!"null".equals(String.valueOf(limit)))
queryParams.put("limit", String.valueOf(limit)); queryParams.put("limit", String.valueOf(limit));
if(!"null".equals(String.valueOf(wlmi))) if(!"null".equals(String.valueOf(wlmi)))
@ -369,6 +369,10 @@ public class WordApi {
} }
} }
public List<String> getEtymologies (String word, String useCanonical) throws ApiException { public List<String> getEtymologies (String word, String useCanonical) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/etymologies".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/etymologies".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -376,10 +380,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
String contentType = "application/json"; String contentType = "application/json";
@ -402,6 +402,10 @@ public class WordApi {
} }
} }
public List<AudioFile> getAudio (String word, String useCanonical, Integer limit) throws ApiException { public List<AudioFile> getAudio (String word, String useCanonical, Integer limit) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/audio".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/audio".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -409,10 +413,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(useCanonical))) if(!"null".equals(String.valueOf(useCanonical)))
queryParams.put("useCanonical", String.valueOf(useCanonical)); queryParams.put("useCanonical", String.valueOf(useCanonical));
if(!"null".equals(String.valueOf(limit))) if(!"null".equals(String.valueOf(limit)))
@ -437,6 +437,10 @@ public class WordApi {
} }
} }
public ScrabbleScoreResult getScrabbleScore (String word) throws ApiException { public ScrabbleScoreResult getScrabbleScore (String word) throws ApiException {
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/word.{format}/{word}/scrabbleScore".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString())); String path = "/word.{format}/{word}/scrabbleScore".replaceAll("\\{format\\}","json").replaceAll("\\{" + "word" + "\\}", apiInvoker.escapeString(word.toString()));
@ -444,10 +448,6 @@ public class WordApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(word == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json"; String contentType = "application/json";
try { try {

View File

@ -24,6 +24,10 @@ public class WordListApi {
} }
public void updateWordList (String permalink, WordList body, String auth_token) throws ApiException { public void updateWordList (String permalink, WordList body, String auth_token) throws ApiException {
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/wordList.{format}/{permalink}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString())); String path = "/wordList.{format}/{permalink}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString()));
@ -31,10 +35,6 @@ public class WordListApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
headerParams.put("auth_token", auth_token); headerParams.put("auth_token", auth_token);
String contentType = "application/json"; String contentType = "application/json";
@ -56,6 +56,10 @@ public class WordListApi {
} }
} }
public void deleteWordList (String permalink, String auth_token) throws ApiException { public void deleteWordList (String permalink, String auth_token) throws ApiException {
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/wordList.{format}/{permalink}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString())); String path = "/wordList.{format}/{permalink}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString()));
@ -63,10 +67,6 @@ public class WordListApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
headerParams.put("auth_token", auth_token); headerParams.put("auth_token", auth_token);
String contentType = "application/json"; String contentType = "application/json";
@ -88,6 +88,10 @@ public class WordListApi {
} }
} }
public WordList getWordListByPermalink (String permalink, String auth_token) throws ApiException { public WordList getWordListByPermalink (String permalink, String auth_token) throws ApiException {
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/wordList.{format}/{permalink}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString())); String path = "/wordList.{format}/{permalink}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString()));
@ -95,10 +99,6 @@ public class WordListApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
headerParams.put("auth_token", auth_token); headerParams.put("auth_token", auth_token);
String contentType = "application/json"; String contentType = "application/json";
@ -120,6 +120,10 @@ public class WordListApi {
} }
} }
public void addWordsToWordList (String permalink, List<StringValue> body, String auth_token) throws ApiException { public void addWordsToWordList (String permalink, List<StringValue> body, String auth_token) throws ApiException {
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/wordList.{format}/{permalink}/words".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString())); String path = "/wordList.{format}/{permalink}/words".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString()));
@ -127,10 +131,6 @@ public class WordListApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
headerParams.put("auth_token", auth_token); headerParams.put("auth_token", auth_token);
String contentType = "application/json"; String contentType = "application/json";
@ -152,6 +152,10 @@ public class WordListApi {
} }
} }
public List<WordListWord> getWordListWords (String permalink, String auth_token, String sortBy, String sortOrder, Integer skip, Integer limit) throws ApiException { public List<WordListWord> getWordListWords (String permalink, String auth_token, String sortBy, String sortOrder, Integer skip, Integer limit) throws ApiException {
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/wordList.{format}/{permalink}/words".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString())); String path = "/wordList.{format}/{permalink}/words".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString()));
@ -159,10 +163,6 @@ public class WordListApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(sortBy))) if(!"null".equals(String.valueOf(sortBy)))
queryParams.put("sortBy", String.valueOf(sortBy)); queryParams.put("sortBy", String.valueOf(sortBy));
if(!"null".equals(String.valueOf(sortOrder))) if(!"null".equals(String.valueOf(sortOrder)))
@ -192,6 +192,10 @@ public class WordListApi {
} }
} }
public void deleteWordsFromWordList (String permalink, List<StringValue> body, String auth_token) throws ApiException { public void deleteWordsFromWordList (String permalink, List<StringValue> body, String auth_token) throws ApiException {
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/wordList.{format}/{permalink}/deleteWords".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString())); String path = "/wordList.{format}/{permalink}/deleteWords".replaceAll("\\{format\\}","json").replaceAll("\\{" + "permalink" + "\\}", apiInvoker.escapeString(permalink.toString()));
@ -199,10 +203,6 @@ public class WordListApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(permalink == null || auth_token == null ) {
throw new ApiException(400, "missing required params");
}
headerParams.put("auth_token", auth_token); headerParams.put("auth_token", auth_token);
String contentType = "application/json"; String contentType = "application/json";

View File

@ -22,6 +22,10 @@ public class WordListsApi {
} }
public WordList createWordList (WordList body, String auth_token) throws ApiException { public WordList createWordList (WordList body, String auth_token) throws ApiException {
// verify required params are set
if(auth_token == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/wordLists.{format}".replaceAll("\\{format\\}","json"); String path = "/wordLists.{format}".replaceAll("\\{format\\}","json");
@ -29,10 +33,6 @@ public class WordListsApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(auth_token == null ) {
throw new ApiException(400, "missing required params");
}
headerParams.put("auth_token", auth_token); headerParams.put("auth_token", auth_token);
String contentType = "application/json"; String contentType = "application/json";

View File

@ -25,6 +25,10 @@ public class WordsApi {
} }
public WordSearchResults searchWords (String query, String includePartOfSpeech, String excludePartOfSpeech, String caseSensitive, Integer minCorpusCount, Integer maxCorpusCount, Integer minDictionaryCount, Integer maxDictionaryCount, Integer minLength, Integer maxLength, Integer skip, Integer limit) throws ApiException { public WordSearchResults searchWords (String query, String includePartOfSpeech, String excludePartOfSpeech, String caseSensitive, Integer minCorpusCount, Integer maxCorpusCount, Integer minDictionaryCount, Integer maxDictionaryCount, Integer minLength, Integer maxLength, Integer skip, Integer limit) throws ApiException {
// verify required params are set
if(query == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/words.{format}/search/{query}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "query" + "\\}", apiInvoker.escapeString(query.toString())); String path = "/words.{format}/search/{query}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "query" + "\\}", apiInvoker.escapeString(query.toString()));
@ -32,10 +36,6 @@ public class WordsApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(query == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(caseSensitive))) if(!"null".equals(String.valueOf(caseSensitive)))
queryParams.put("caseSensitive", String.valueOf(caseSensitive)); queryParams.put("caseSensitive", String.valueOf(caseSensitive));
if(!"null".equals(String.valueOf(includePartOfSpeech))) if(!"null".equals(String.valueOf(includePartOfSpeech)))
@ -107,6 +107,10 @@ public class WordsApi {
} }
} }
public DefinitionSearchResults reverseDictionary (String query, String findSenseForWord, String includeSourceDictionaries, String excludeSourceDictionaries, String includePartOfSpeech, String excludePartOfSpeech, String expandTerms, String sortBy, String sortOrder, Integer minCorpusCount, Integer maxCorpusCount, Integer minLength, Integer maxLength, String includeTags, String skip, Integer limit) throws ApiException { public DefinitionSearchResults reverseDictionary (String query, String findSenseForWord, String includeSourceDictionaries, String excludeSourceDictionaries, String includePartOfSpeech, String excludePartOfSpeech, String expandTerms, String sortBy, String sortOrder, Integer minCorpusCount, Integer maxCorpusCount, Integer minLength, Integer maxLength, String includeTags, String skip, Integer limit) throws ApiException {
// verify required params are set
if(query == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables // create path and map variables
String path = "/words.{format}/reverseDictionary".replaceAll("\\{format\\}","json"); String path = "/words.{format}/reverseDictionary".replaceAll("\\{format\\}","json");
@ -114,10 +118,6 @@ public class WordsApi {
Map<String, String> queryParams = new HashMap<String, String>(); Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>(); Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(query == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(query))) if(!"null".equals(String.valueOf(query)))
queryParams.put("query", String.valueOf(query)); queryParams.put("query", String.valueOf(query));
if(!"null".equals(String.valueOf(findSenseForWord))) if(!"null".equals(String.valueOf(findSenseForWord)))

View File

@ -26,13 +26,6 @@ public class {{classname}} {
{{#operation}} {{#operation}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
// create path and map variables
String path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{paramName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
{{#requiredParamCount}} {{#requiredParamCount}}
// verify required params are set // verify required params are set
if({{/requiredParamCount}}{{#requiredParams}} {{paramName}} == null {{#hasMore}}|| {{/hasMore}}{{/requiredParams}}{{#requiredParamCount}}) { if({{/requiredParamCount}}{{#requiredParams}} {{paramName}} == null {{#hasMore}}|| {{/hasMore}}{{/requiredParams}}{{#requiredParamCount}}) {
@ -40,6 +33,13 @@ public class {{classname}} {
} }
{{/requiredParamCount}} {{/requiredParamCount}}
// create path and map variables
String path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{paramName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
{{#queryParams}}if(!"null".equals(String.valueOf({{paramName}}))) {{#queryParams}}if(!"null".equals(String.valueOf({{paramName}})))
queryParams.put("{{baseName}}", String.valueOf({{paramName}})); queryParams.put("{{baseName}}", String.valueOf({{paramName}}));
{{/queryParams}} {{/queryParams}}

View File

@ -30,13 +30,6 @@ public class {{classname}} {
{{#operation}} {{#operation}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
// create path and map variables
String path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{paramName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
{{#requiredParamCount}} {{#requiredParamCount}}
// verify required params are set // verify required params are set
if({{/requiredParamCount}}{{#requiredParams}} {{paramName}} == null {{#hasMore}}|| {{/hasMore}}{{/requiredParams}}{{#requiredParamCount}}) { if({{/requiredParamCount}}{{#requiredParams}} {{paramName}} == null {{#hasMore}}|| {{/hasMore}}{{/requiredParams}}{{#requiredParamCount}}) {
@ -44,6 +37,13 @@ public class {{classname}} {
} }
{{/requiredParamCount}} {{/requiredParamCount}}
// create path and map variables
String path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{paramName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
{{#queryParams}}if(!"null".equals(String.valueOf({{paramName}}))) {{#queryParams}}if(!"null".equals(String.valueOf({{paramName}})))
queryParams.put("{{paramName}}", String.valueOf({{paramName}})); queryParams.put("{{paramName}}", String.valueOf({{paramName}}));
{{/queryParams}} {{/queryParams}}