Java client: add ApiException to javadoc

and some indentation fixes
This commit is contained in:
xhh 2016-02-23 20:09:46 +08:00
parent 0520e68e29
commit 37c77d63c2
8 changed files with 115 additions and 95 deletions

View File

@ -41,18 +41,19 @@ public class {{classname}} {
{{#operation}} {{#operation}}
/** /**
* {{summary}} * {{summary}}
* {{notes}} * {{notes}}{{#allParams}}
{{#allParams}} * @param {{paramName}} {{description}} * @param {{paramName}} {{description}}{{/allParams}}{{#returnType}}
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} * @return {{{returnType}}}{{/returnType}}
* @throws ApiException if fails to make API call
*/ */
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
if ({{paramName}} == null) { if ({{paramName}} == null) {
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}");
} }
{{/required}}{{/allParams}} {{/required}}{{/allParams}}
// create path and map variables // create path and map variables
String {{localVariablePrefix}}path = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}} String {{localVariablePrefix}}path = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; .replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};

View File

@ -41,9 +41,10 @@ public class {{classname}} {
{{#operation}} {{#operation}}
/** /**
* {{summary}} * {{summary}}
* {{notes}} * {{notes}}{{#allParams}}
{{#allParams}} * @param {{paramName}} {{description}} * @param {{paramName}} {{description}}{{/allParams}}{{#returnType}}
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} * @return {{{returnType}}}{{/returnType}}
* @throws ApiException if fails to make API call
*/ */
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
@ -67,7 +68,7 @@ public class {{classname}} {
{{/queryParams}} {{/queryParams}}
{{#headerParams}}if ({{paramName}} != null) {{#headerParams}}if ({{paramName}} != null)
{{localVariablePrefix}}headerParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}})); {{localVariablePrefix}}headerParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));
{{/headerParams}} {{/headerParams}}
{{#formParams}}if ({{paramName}} != null) {{#formParams}}if ({{paramName}} != null)

View File

@ -15,7 +15,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:20.498+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:01:57.005+08:00")
public class PetApi { public class PetApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -40,7 +40,7 @@ public class PetApi {
* Update an existing pet * Update an existing pet
* *
* @param body Pet object that needs to be added to the store * @param body Pet object that needs to be added to the store
* @return void * @throws ApiException if fails to make API call
*/ */
public void updatePet(Pet body) throws ApiException { public void updatePet(Pet body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -80,7 +80,7 @@ public class PetApi {
* Add a new pet to the store * Add a new pet to the store
* *
* @param body Pet object that needs to be added to the store * @param body Pet object that needs to be added to the store
* @return void * @throws ApiException if fails to make API call
*/ */
public void addPet(Pet body) throws ApiException { public void addPet(Pet body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -121,6 +121,7 @@ public class PetApi {
* Multiple status values can be provided with comma seperated strings * Multiple status values can be provided with comma seperated strings
* @param status Status values that need to be considered for filter * @param status Status values that need to be considered for filter
* @return List<Pet> * @return List<Pet>
* @throws ApiException if fails to make API call
*/ */
public List<Pet> findPetsByStatus(List<String> status) throws ApiException { public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
Object postBody = null; Object postBody = null;
@ -164,6 +165,7 @@ public class PetApi {
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by * @param tags Tags to filter by
* @return List<Pet> * @return List<Pet>
* @throws ApiException if fails to make API call
*/ */
public List<Pet> findPetsByTags(List<String> tags) throws ApiException { public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
Object postBody = null; Object postBody = null;
@ -207,15 +209,16 @@ public class PetApi {
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched * @param petId ID of pet that needs to be fetched
* @return Pet * @return Pet
* @throws ApiException if fails to make API call
*/ */
public Pet getPetById(Long petId) throws ApiException { public Pet getPetById(Long petId) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
if (petId == null) { if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById"); throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
} }
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json") String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@ -255,16 +258,16 @@ public class PetApi {
* @param petId ID of pet that needs to be updated * @param petId ID of pet that needs to be updated
* @param name Updated name of the pet * @param name Updated name of the pet
* @param status Updated status of the pet * @param status Updated status of the pet
* @return void * @throws ApiException if fails to make API call
*/ */
public void updatePetWithForm(String petId, String name, String status) throws ApiException { public void updatePetWithForm(String petId, String name, String status) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
if (petId == null) { if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm"); throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
} }
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json") String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@ -306,16 +309,16 @@ public class PetApi {
* *
* @param petId Pet id to delete * @param petId Pet id to delete
* @param apiKey * @param apiKey
* @return void * @throws ApiException if fails to make API call
*/ */
public void deletePet(Long petId, String apiKey) throws ApiException { public void deletePet(Long petId, String apiKey) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
if (petId == null) { if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"); throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
} }
// create path and map variables // create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json") String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@ -356,16 +359,16 @@ public class PetApi {
* @param petId ID of pet to update * @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server * @param additionalMetadata Additional data to pass to server
* @param file file to upload * @param file file to upload
* @return void * @throws ApiException if fails to make API call
*/ */
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
if (petId == null) { if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile"); throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
} }
// create path and map variables // create path and map variables
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@ -407,15 +410,16 @@ public class PetApi {
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched * @param petId ID of pet that needs to be fetched
* @return byte[] * @return byte[]
* @throws ApiException if fails to make API call
*/ */
public byte[] getPetByIdWithByteArray(Long petId) throws ApiException { public byte[] getPetByIdWithByteArray(Long petId) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
if (petId == null) { if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetByIdWithByteArray"); throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetByIdWithByteArray");
} }
// create path and map variables // create path and map variables
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json") String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@ -453,7 +457,7 @@ public class PetApi {
* Fake endpoint to test byte array in body parameter for adding a new pet to the store * Fake endpoint to test byte array in body parameter for adding a new pet to the store
* *
* @param body Pet object in the form of byte array * @param body Pet object in the form of byte array
* @return void * @throws ApiException if fails to make API call
*/ */
public void addPetUsingByteArray(byte[] body) throws ApiException { public void addPetUsingByteArray(byte[] body) throws ApiException {
Object postBody = body; Object postBody = body;

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:20.498+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:01:57.005+08:00")
public class StoreApi { public class StoreApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -39,6 +39,7 @@ public class StoreApi {
* Returns pet inventories by status * Returns pet inventories by status
* Returns a map of status codes to quantities * Returns a map of status codes to quantities
* @return Map<String, Integer> * @return Map<String, Integer>
* @throws ApiException if fails to make API call
*/ */
public Map<String, Integer> getInventory() throws ApiException { public Map<String, Integer> getInventory() throws ApiException {
Object postBody = null; Object postBody = null;
@ -80,6 +81,7 @@ public class StoreApi {
* *
* @param body order placed for purchasing the pet * @param body order placed for purchasing the pet
* @return Order * @return Order
* @throws ApiException if fails to make API call
*/ */
public Order placeOrder(Order body) throws ApiException { public Order placeOrder(Order body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -121,15 +123,16 @@ public class StoreApi {
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched * @param orderId ID of pet that needs to be fetched
* @return Order * @return Order
* @throws ApiException if fails to make API call
*/ */
public Order getOrderById(String orderId) throws ApiException { public Order getOrderById(String orderId) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'orderId' is set // verify the required parameter 'orderId' is set
if (orderId == null) { if (orderId == null) {
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById"); throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
} }
// create path and map variables // create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json") String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
@ -167,16 +170,16 @@ public class StoreApi {
* Delete purchase order by ID * Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted * @param orderId ID of the order that needs to be deleted
* @return void * @throws ApiException if fails to make API call
*/ */
public void deleteOrder(String orderId) throws ApiException { public void deleteOrder(String orderId) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'orderId' is set // verify the required parameter 'orderId' is set
if (orderId == null) { if (orderId == null) {
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder"); throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
} }
// create path and map variables // create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json") String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-12T18:48:10.013-08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:01:57.005+08:00")
public class UserApi { public class UserApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -39,7 +39,7 @@ public class UserApi {
* Create user * Create user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param body Created user object * @param body Created user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void createUser(User body) throws ApiException { public void createUser(User body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -79,7 +79,7 @@ public class UserApi {
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object * @param body List of user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void createUsersWithArrayInput(List<User> body) throws ApiException { public void createUsersWithArrayInput(List<User> body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -119,7 +119,7 @@ public class UserApi {
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object * @param body List of user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void createUsersWithListInput(List<User> body) throws ApiException { public void createUsersWithListInput(List<User> body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -161,6 +161,7 @@ public class UserApi {
* @param username The user name for login * @param username The user name for login
* @param password The password for login in clear text * @param password The password for login in clear text
* @return String * @return String
* @throws ApiException if fails to make API call
*/ */
public String loginUser(String username, String password) throws ApiException { public String loginUser(String username, String password) throws ApiException {
Object postBody = null; Object postBody = null;
@ -204,7 +205,7 @@ public class UserApi {
/** /**
* Logs out current logged in user session * Logs out current logged in user session
* *
* @return void * @throws ApiException if fails to make API call
*/ */
public void logoutUser() throws ApiException { public void logoutUser() throws ApiException {
Object postBody = null; Object postBody = null;
@ -245,15 +246,16 @@ public class UserApi {
* *
* @param username The name that needs to be fetched. Use user1 for testing. * @param username The name that needs to be fetched. Use user1 for testing.
* @return User * @return User
* @throws ApiException if fails to make API call
*/ */
public User getUserByName(String username) throws ApiException { public User getUserByName(String username) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
if (username == null) { if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName"); throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
} }
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json") String path = "/user/{username}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
@ -292,16 +294,16 @@ public class UserApi {
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username name that need to be deleted * @param username name that need to be deleted
* @param body Updated user object * @param body Updated user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void updateUser(String username, User body) throws ApiException { public void updateUser(String username, User body) throws ApiException {
Object postBody = body; Object postBody = body;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
if (username == null) { if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
} }
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json") String path = "/user/{username}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
@ -338,16 +340,16 @@ public class UserApi {
* Delete user * Delete user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username The name that needs to be deleted * @param username The name that needs to be deleted
* @return void * @throws ApiException if fails to make API call
*/ */
public void deleteUser(String username) throws ApiException { public void deleteUser(String username) throws ApiException {
Object postBody = null; Object postBody = null;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
if (username == null) { if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser"); throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
} }
// create path and map variables // create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json") String path = "/user/{username}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));

View File

@ -15,7 +15,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:21.885+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:02:09.740+08:00")
public class PetApi { public class PetApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -40,7 +40,7 @@ public class PetApi {
* Update an existing pet * Update an existing pet
* *
* @param body Pet object that needs to be added to the store * @param body Pet object that needs to be added to the store
* @return void * @throws ApiException if fails to make API call
*/ */
public void updatePet(Pet body) throws ApiException { public void updatePet(Pet body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -80,7 +80,7 @@ public class PetApi {
* Add a new pet to the store * Add a new pet to the store
* *
* @param body Pet object that needs to be added to the store * @param body Pet object that needs to be added to the store
* @return void * @throws ApiException if fails to make API call
*/ */
public void addPet(Pet body) throws ApiException { public void addPet(Pet body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -121,6 +121,7 @@ public class PetApi {
* Multiple status values can be provided with comma seperated strings * Multiple status values can be provided with comma seperated strings
* @param status Status values that need to be considered for filter * @param status Status values that need to be considered for filter
* @return List<Pet> * @return List<Pet>
* @throws ApiException if fails to make API call
*/ */
public List<Pet> findPetsByStatus(List<String> status) throws ApiException { public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
Object postBody = null; Object postBody = null;
@ -164,6 +165,7 @@ public class PetApi {
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by * @param tags Tags to filter by
* @return List<Pet> * @return List<Pet>
* @throws ApiException if fails to make API call
*/ */
public List<Pet> findPetsByTags(List<String> tags) throws ApiException { public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
Object postBody = null; Object postBody = null;
@ -207,6 +209,7 @@ public class PetApi {
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched * @param petId ID of pet that needs to be fetched
* @return Pet * @return Pet
* @throws ApiException if fails to make API call
*/ */
public Pet getPetById(Long petId) throws ApiException { public Pet getPetById(Long petId) throws ApiException {
Object postBody = null; Object postBody = null;
@ -255,7 +258,7 @@ public class PetApi {
* @param petId ID of pet that needs to be updated * @param petId ID of pet that needs to be updated
* @param name Updated name of the pet * @param name Updated name of the pet
* @param status Updated status of the pet * @param status Updated status of the pet
* @return void * @throws ApiException if fails to make API call
*/ */
public void updatePetWithForm(String petId, String name, String status) throws ApiException { public void updatePetWithForm(String petId, String name, String status) throws ApiException {
Object postBody = null; Object postBody = null;
@ -306,7 +309,7 @@ public class PetApi {
* *
* @param petId Pet id to delete * @param petId Pet id to delete
* @param apiKey * @param apiKey
* @return void * @throws ApiException if fails to make API call
*/ */
public void deletePet(Long petId, String apiKey) throws ApiException { public void deletePet(Long petId, String apiKey) throws ApiException {
Object postBody = null; Object postBody = null;
@ -328,7 +331,7 @@ public class PetApi {
if (apiKey != null) if (apiKey != null)
headerParams.put("api_key", apiClient.parameterToString(apiKey)); headerParams.put("api_key", apiClient.parameterToString(apiKey));
@ -356,7 +359,7 @@ public class PetApi {
* @param petId ID of pet to update * @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server * @param additionalMetadata Additional data to pass to server
* @param file file to upload * @param file file to upload
* @return void * @throws ApiException if fails to make API call
*/ */
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
Object postBody = null; Object postBody = null;
@ -407,6 +410,7 @@ public class PetApi {
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched * @param petId ID of pet that needs to be fetched
* @return byte[] * @return byte[]
* @throws ApiException if fails to make API call
*/ */
public byte[] getPetByIdWithByteArray(Long petId) throws ApiException { public byte[] getPetByIdWithByteArray(Long petId) throws ApiException {
Object postBody = null; Object postBody = null;
@ -453,7 +457,7 @@ public class PetApi {
* Fake endpoint to test byte array in body parameter for adding a new pet to the store * Fake endpoint to test byte array in body parameter for adding a new pet to the store
* *
* @param body Pet object in the form of byte array * @param body Pet object in the form of byte array
* @return void * @throws ApiException if fails to make API call
*/ */
public void addPetUsingByteArray(byte[] body) throws ApiException { public void addPetUsingByteArray(byte[] body) throws ApiException {
Object postBody = body; Object postBody = body;

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:21.885+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:02:09.740+08:00")
public class StoreApi { public class StoreApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -39,6 +39,7 @@ public class StoreApi {
* Returns pet inventories by status * Returns pet inventories by status
* Returns a map of status codes to quantities * Returns a map of status codes to quantities
* @return Map<String, Integer> * @return Map<String, Integer>
* @throws ApiException if fails to make API call
*/ */
public Map<String, Integer> getInventory() throws ApiException { public Map<String, Integer> getInventory() throws ApiException {
Object postBody = null; Object postBody = null;
@ -80,6 +81,7 @@ public class StoreApi {
* *
* @param body order placed for purchasing the pet * @param body order placed for purchasing the pet
* @return Order * @return Order
* @throws ApiException if fails to make API call
*/ */
public Order placeOrder(Order body) throws ApiException { public Order placeOrder(Order body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -121,6 +123,7 @@ public class StoreApi {
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched * @param orderId ID of pet that needs to be fetched
* @return Order * @return Order
* @throws ApiException if fails to make API call
*/ */
public Order getOrderById(String orderId) throws ApiException { public Order getOrderById(String orderId) throws ApiException {
Object postBody = null; Object postBody = null;
@ -167,7 +170,7 @@ public class StoreApi {
* Delete purchase order by ID * Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted * @param orderId ID of the order that needs to be deleted
* @return void * @throws ApiException if fails to make API call
*/ */
public void deleteOrder(String orderId) throws ApiException { public void deleteOrder(String orderId) throws ApiException {
Object postBody = null; Object postBody = null;

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-01-28T16:23:25.238+01:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:02:09.740+08:00")
public class UserApi { public class UserApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -39,7 +39,7 @@ public class UserApi {
* Create user * Create user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param body Created user object * @param body Created user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void createUser(User body) throws ApiException { public void createUser(User body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -79,7 +79,7 @@ public class UserApi {
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object * @param body List of user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void createUsersWithArrayInput(List<User> body) throws ApiException { public void createUsersWithArrayInput(List<User> body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -119,7 +119,7 @@ public class UserApi {
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object * @param body List of user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void createUsersWithListInput(List<User> body) throws ApiException { public void createUsersWithListInput(List<User> body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -161,6 +161,7 @@ public class UserApi {
* @param username The user name for login * @param username The user name for login
* @param password The password for login in clear text * @param password The password for login in clear text
* @return String * @return String
* @throws ApiException if fails to make API call
*/ */
public String loginUser(String username, String password) throws ApiException { public String loginUser(String username, String password) throws ApiException {
Object postBody = null; Object postBody = null;
@ -204,7 +205,7 @@ public class UserApi {
/** /**
* Logs out current logged in user session * Logs out current logged in user session
* *
* @return void * @throws ApiException if fails to make API call
*/ */
public void logoutUser() throws ApiException { public void logoutUser() throws ApiException {
Object postBody = null; Object postBody = null;
@ -245,6 +246,7 @@ public class UserApi {
* *
* @param username The name that needs to be fetched. Use user1 for testing. * @param username The name that needs to be fetched. Use user1 for testing.
* @return User * @return User
* @throws ApiException if fails to make API call
*/ */
public User getUserByName(String username) throws ApiException { public User getUserByName(String username) throws ApiException {
Object postBody = null; Object postBody = null;
@ -292,7 +294,7 @@ public class UserApi {
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username name that need to be deleted * @param username name that need to be deleted
* @param body Updated user object * @param body Updated user object
* @return void * @throws ApiException if fails to make API call
*/ */
public void updateUser(String username, User body) throws ApiException { public void updateUser(String username, User body) throws ApiException {
Object postBody = body; Object postBody = body;
@ -338,7 +340,7 @@ public class UserApi {
* Delete user * Delete user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username The name that needs to be deleted * @param username The name that needs to be deleted
* @return void * @throws ApiException if fails to make API call
*/ */
public void deleteUser(String username) throws ApiException { public void deleteUser(String username) throws ApiException {
Object postBody = null; Object postBody = null;