mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
java update petstore clients
This commit is contained in:
parent
d4543a99e3
commit
e5001a0c8d
@ -17,7 +17,7 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
*/
|
||||
|
@ -65,7 +65,7 @@ public interface UserApi extends ApiClient.Api {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
*/
|
||||
@RequestLine("GET /user/{username}")
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -39,6 +39,7 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param body client model
|
||||
@ -52,6 +53,7 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param body client model
|
||||
|
@ -324,7 +324,7 @@ public class UserApi {
|
||||
* <p><b>200</b> - successful operation
|
||||
* <p><b>400</b> - Invalid username supplied
|
||||
* <p><b>404</b> - User not found
|
||||
* @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
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
**/
|
||||
@ -340,7 +340,7 @@ public class UserApi {
|
||||
* <p><b>200</b> - successful operation
|
||||
* <p><b>400</b> - Invalid username supplied
|
||||
* <p><b>404</b> - User not found
|
||||
* @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.
|
||||
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
|
||||
* @return User
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException if fails to make API call
|
||||
|
@ -216,7 +216,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -63,9 +63,6 @@ public class ApiClient {
|
||||
|
||||
protected Map<String, Authentication> authentications;
|
||||
|
||||
protected int statusCode;
|
||||
protected Map<String, List<String>> responseHeaders;
|
||||
|
||||
protected DateFormat dateFormat;
|
||||
|
||||
public ApiClient() {
|
||||
@ -113,22 +110,6 @@ public class ApiClient {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status code of the previous request
|
||||
* @return Status code
|
||||
*/
|
||||
public int getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the response headers of the previous request
|
||||
* @return Response headers
|
||||
*/
|
||||
public Map<String, List<String>> getResponseHeaders() {
|
||||
return responseHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get authentications (key: authentication name, value: authentication).
|
||||
* @return Map of authentication object
|
||||
@ -658,7 +639,7 @@ public class ApiClient {
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public <T> T invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
|
||||
updateParamsForAuth(authNames, queryParams, headerParams);
|
||||
|
||||
// Not using `.target(this.basePath).path(path)` below,
|
||||
@ -713,16 +694,16 @@ public class ApiClient {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
|
||||
statusCode = response.getStatusInfo().getStatusCode();
|
||||
responseHeaders = buildResponseHeaders(response);
|
||||
int statusCode = response.getStatusInfo().getStatusCode();
|
||||
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);
|
||||
|
||||
if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) {
|
||||
return null;
|
||||
return new ApiResponse<>(statusCode, responseHeaders);
|
||||
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
|
||||
if (returnType == null)
|
||||
return null;
|
||||
return new ApiResponse<>(statusCode, responseHeaders);
|
||||
else
|
||||
return deserialize(response, returnType);
|
||||
return new ApiResponse<>(statusCode, responseHeaders, deserialize(response, returnType));
|
||||
} else {
|
||||
String message = "error";
|
||||
String respBody = null;
|
||||
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.swagger.client;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* API response returned by API call.
|
||||
*
|
||||
* @param <T> The type of data that is deserialized from response body
|
||||
*/
|
||||
public class ApiResponse<T> {
|
||||
private final int statusCode;
|
||||
private final Map<String, List<String>> headers;
|
||||
private final T data;
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers) {
|
||||
this(statusCode, headers, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
* @param data The object deserialized from response bod
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
|
||||
this.statusCode = statusCode;
|
||||
this.headers = headers;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -42,6 +43,17 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Client testSpecialTags(Client body) throws ApiException {
|
||||
return testSpecialTagsWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Client> testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -46,6 +47,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
|
||||
return fakeOuterBooleanSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @return ApiResponse<Boolean>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -82,6 +94,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
|
||||
return fakeOuterCompositeSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @return ApiResponse<OuterComposite>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -118,6 +141,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
|
||||
return fakeOuterNumberSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @return ApiResponse<BigDecimal>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -154,6 +188,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String fakeOuterStringSerialize(String body) throws ApiException {
|
||||
return fakeOuterStringSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -190,6 +235,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Client testClientModel(Client body) throws ApiException {
|
||||
return testClientModelWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -243,6 +299,30 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||
|
||||
testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'number' is set
|
||||
@ -317,7 +397,7 @@ if (paramCallback != null)
|
||||
String[] localVarAuthNames = new String[] { "http_basic_test" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* To test enum parameters
|
||||
@ -333,6 +413,24 @@ if (paramCallback != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
|
||||
|
||||
testEnumParametersWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
@ -372,7 +470,7 @@ if (enumQueryDouble != null)
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
@ -381,6 +479,17 @@ if (enumQueryDouble != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
|
||||
testInlineAdditionalPropertiesWithHttpInfo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Object param) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
@ -412,7 +521,7 @@ if (enumQueryDouble != null)
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
@ -422,6 +531,18 @@ if (enumQueryDouble != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testJsonFormData(String param, String param2) throws ApiException {
|
||||
|
||||
testJsonFormDataWithHttpInfo(param, param2);
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
@ -462,6 +583,6 @@ if (param2 != null)
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -36,12 +37,23 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Client testClassname(Client body) throws ApiException {
|
||||
return testClassnameWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -43,6 +44,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void addPet(Pet body) throws ApiException {
|
||||
|
||||
addPetWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -74,7 +86,7 @@ public class PetApi {
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Deletes a pet
|
||||
@ -84,6 +96,18 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void deletePet(Long petId, String apiKey) throws ApiException {
|
||||
|
||||
deletePetWithHttpInfo(petId, apiKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -118,7 +142,7 @@ public class PetApi {
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by status
|
||||
@ -128,6 +152,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
|
||||
return findPetsByStatusWithHttpInfo(status).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return ApiResponse<List<Pet>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
@ -172,6 +207,19 @@ public class PetApi {
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
return findPetsByTagsWithHttpInfo(tags).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return ApiResponse<List<Pet>>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
@ -214,6 +262,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Pet getPetById(Long petId) throws ApiException {
|
||||
return getPetByIdWithHttpInfo(petId).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return ApiResponse<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -255,6 +314,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void updatePet(Pet body) throws ApiException {
|
||||
|
||||
updatePetWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -286,7 +356,7 @@ public class PetApi {
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
@ -297,6 +367,19 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
|
||||
|
||||
updatePetWithFormWithHttpInfo(petId, name, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -333,7 +416,7 @@ if (status != null)
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* uploads an image
|
||||
@ -345,6 +428,19 @@ if (status != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -41,6 +42,17 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void deleteOrder(String orderId) throws ApiException {
|
||||
|
||||
deleteOrderWithHttpInfo(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
@ -73,7 +85,7 @@ public class StoreApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
@ -82,6 +94,16 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Map<String, Integer> getInventory() throws ApiException {
|
||||
return getInventoryWithHttpInfo().getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return ApiResponse<Map<String, Integer>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
@ -118,6 +140,17 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Order getOrderById(Long orderId) throws ApiException {
|
||||
return getOrderByIdWithHttpInfo(orderId).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return ApiResponse<Order>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
@ -160,6 +193,17 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Order placeOrder(Order body) throws ApiException {
|
||||
return placeOrderWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @return ApiResponse<Order>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -41,6 +42,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void createUser(User body) throws ApiException {
|
||||
|
||||
createUserWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -72,7 +84,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -81,6 +93,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void createUsersWithArrayInput(List<User> body) throws ApiException {
|
||||
|
||||
createUsersWithArrayInputWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -112,7 +135,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -121,6 +144,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void createUsersWithListInput(List<User> body) throws ApiException {
|
||||
|
||||
createUsersWithListInputWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -152,7 +186,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Delete user
|
||||
@ -161,6 +195,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void deleteUser(String username) throws ApiException {
|
||||
|
||||
deleteUserWithHttpInfo(username);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -193,16 +238,27 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public User getUserByName(String username) throws ApiException {
|
||||
return getUserByNameWithHttpInfo(username).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return ApiResponse<User>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -246,6 +302,18 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String loginUser(String username, String password) throws ApiException {
|
||||
return loginUserWithHttpInfo(username, password).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -292,6 +360,16 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void logoutUser() throws ApiException {
|
||||
|
||||
logoutUserWithHttpInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
@ -318,7 +396,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Updated user
|
||||
@ -328,6 +406,18 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void updateUser(String username, User body) throws ApiException {
|
||||
|
||||
updateUserWithHttpInfo(username, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -365,6 +455,6 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -64,9 +64,6 @@ public class ApiClient {
|
||||
|
||||
protected Map<String, Authentication> authentications;
|
||||
|
||||
protected int statusCode;
|
||||
protected Map<String, List<String>> responseHeaders;
|
||||
|
||||
protected DateFormat dateFormat;
|
||||
|
||||
public ApiClient() {
|
||||
@ -114,22 +111,6 @@ public class ApiClient {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status code of the previous request
|
||||
* @return Status code
|
||||
*/
|
||||
public int getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the response headers of the previous request
|
||||
* @return Response headers
|
||||
*/
|
||||
public Map<String, List<String>> getResponseHeaders() {
|
||||
return responseHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get authentications (key: authentication name, value: authentication).
|
||||
* @return Map of authentication object
|
||||
@ -658,7 +639,7 @@ public class ApiClient {
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public <T> T invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
|
||||
updateParamsForAuth(authNames, queryParams, headerParams);
|
||||
|
||||
// Not using `.target(this.basePath).path(path)` below,
|
||||
@ -713,16 +694,16 @@ public class ApiClient {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
|
||||
statusCode = response.getStatusInfo().getStatusCode();
|
||||
responseHeaders = buildResponseHeaders(response);
|
||||
int statusCode = response.getStatusInfo().getStatusCode();
|
||||
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);
|
||||
|
||||
if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) {
|
||||
return null;
|
||||
return new ApiResponse<>(statusCode, responseHeaders);
|
||||
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
|
||||
if (returnType == null)
|
||||
return null;
|
||||
return new ApiResponse<>(statusCode, responseHeaders);
|
||||
else
|
||||
return deserialize(response, returnType);
|
||||
return new ApiResponse<>(statusCode, responseHeaders, deserialize(response, returnType));
|
||||
} else {
|
||||
String message = "error";
|
||||
String respBody = null;
|
||||
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package io.swagger.client;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* API response returned by API call.
|
||||
*
|
||||
* @param <T> The type of data that is deserialized from response body
|
||||
*/
|
||||
public class ApiResponse<T> {
|
||||
private final int statusCode;
|
||||
private final Map<String, List<String>> headers;
|
||||
private final T data;
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers) {
|
||||
this(statusCode, headers, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
* @param data The object deserialized from response bod
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
|
||||
this.statusCode = statusCode;
|
||||
this.headers = headers;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -42,6 +43,17 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Client testSpecialTags(Client body) throws ApiException {
|
||||
return testSpecialTagsWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Client> testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -46,6 +47,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
|
||||
return fakeOuterBooleanSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @return ApiResponse<Boolean>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -82,6 +94,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
|
||||
return fakeOuterCompositeSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @return ApiResponse<OuterComposite>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -118,6 +141,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
|
||||
return fakeOuterNumberSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @return ApiResponse<BigDecimal>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -154,6 +188,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String fakeOuterStringSerialize(String body) throws ApiException {
|
||||
return fakeOuterStringSerializeWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -190,6 +235,17 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Client testClientModel(Client body) throws ApiException {
|
||||
return testClientModelWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -243,6 +299,30 @@ public class FakeApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||
|
||||
testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'number' is set
|
||||
@ -317,7 +397,7 @@ if (paramCallback != null)
|
||||
String[] localVarAuthNames = new String[] { "http_basic_test" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* To test enum parameters
|
||||
@ -333,6 +413,24 @@ if (paramCallback != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
|
||||
|
||||
testEnumParametersWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
@ -372,7 +470,7 @@ if (enumQueryDouble != null)
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
@ -381,6 +479,17 @@ if (enumQueryDouble != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
|
||||
testInlineAdditionalPropertiesWithHttpInfo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Object param) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
@ -412,7 +521,7 @@ if (enumQueryDouble != null)
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
@ -422,6 +531,18 @@ if (enumQueryDouble != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testJsonFormData(String param, String param2) throws ApiException {
|
||||
|
||||
testJsonFormDataWithHttpInfo(param, param2);
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
@ -462,6 +583,6 @@ if (param2 != null)
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -36,12 +37,23 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Client testClassname(Client body) throws ApiException {
|
||||
return testClassnameWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -43,6 +44,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void addPet(Pet body) throws ApiException {
|
||||
|
||||
addPetWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -74,7 +86,7 @@ public class PetApi {
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Deletes a pet
|
||||
@ -84,6 +96,18 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void deletePet(Long petId, String apiKey) throws ApiException {
|
||||
|
||||
deletePetWithHttpInfo(petId, apiKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -118,7 +142,7 @@ public class PetApi {
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by status
|
||||
@ -128,6 +152,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
|
||||
return findPetsByStatusWithHttpInfo(status).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return ApiResponse<List<Pet>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
@ -172,6 +207,19 @@ public class PetApi {
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
return findPetsByTagsWithHttpInfo(tags).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return ApiResponse<List<Pet>>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
@ -214,6 +262,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Pet getPetById(Long petId) throws ApiException {
|
||||
return getPetByIdWithHttpInfo(petId).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return ApiResponse<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -255,6 +314,17 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void updatePet(Pet body) throws ApiException {
|
||||
|
||||
updatePetWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -286,7 +356,7 @@ public class PetApi {
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
@ -297,6 +367,19 @@ public class PetApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
|
||||
|
||||
updatePetWithFormWithHttpInfo(petId, name, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -333,7 +416,7 @@ if (status != null)
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* uploads an image
|
||||
@ -345,6 +428,19 @@ if (status != null)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -41,6 +42,17 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void deleteOrder(String orderId) throws ApiException {
|
||||
|
||||
deleteOrderWithHttpInfo(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
@ -73,7 +85,7 @@ public class StoreApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
@ -82,6 +94,16 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Map<String, Integer> getInventory() throws ApiException {
|
||||
return getInventoryWithHttpInfo().getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return ApiResponse<Map<String, Integer>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
@ -118,6 +140,17 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Order getOrderById(Long orderId) throws ApiException {
|
||||
return getOrderByIdWithHttpInfo(orderId).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return ApiResponse<Order>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
@ -160,6 +193,17 @@ public class StoreApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public Order placeOrder(Order body) throws ApiException {
|
||||
return placeOrderWithHttpInfo(body).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @return ApiResponse<Order>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
import io.swagger.client.ApiClient;
|
||||
import io.swagger.client.ApiResponse;
|
||||
import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
@ -41,6 +42,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void createUser(User body) throws ApiException {
|
||||
|
||||
createUserWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -72,7 +84,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -81,6 +93,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void createUsersWithArrayInput(List<User> body) throws ApiException {
|
||||
|
||||
createUsersWithArrayInputWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -112,7 +135,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -121,6 +144,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void createUsersWithListInput(List<User> body) throws ApiException {
|
||||
|
||||
createUsersWithListInputWithHttpInfo(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
@ -152,7 +186,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Delete user
|
||||
@ -161,6 +195,17 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void deleteUser(String username) throws ApiException {
|
||||
|
||||
deleteUserWithHttpInfo(username);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -193,16 +238,27 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public User getUserByName(String username) throws ApiException {
|
||||
return getUserByNameWithHttpInfo(username).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return ApiResponse<User>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -246,6 +302,18 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String loginUser(String username, String password) throws ApiException {
|
||||
return loginUserWithHttpInfo(username, password).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -292,6 +360,16 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void logoutUser() throws ApiException {
|
||||
|
||||
logoutUserWithHttpInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
@ -318,7 +396,7 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* Updated user
|
||||
@ -328,6 +406,18 @@ public class UserApi {
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void updateUser(String username, User body) throws ApiException {
|
||||
|
||||
updateUserWithHttpInfo(username, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@ -365,6 +455,6 @@ public class UserApi {
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException if fails to make API call
|
||||
@ -48,7 +48,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
|
@ -243,7 +243,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
@ -254,7 +254,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return ApiResponse<User>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
@ -131,7 +131,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
@ -144,7 +144,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case (asynchronously)
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
|
@ -529,7 +529,7 @@ public class UserApi {
|
||||
}
|
||||
/**
|
||||
* Build call for getUserByName
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
@ -594,7 +594,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
@ -606,7 +606,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return ApiResponse<User>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
@ -619,7 +619,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name (asynchronously)
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
@ -131,7 +131,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
@ -144,7 +144,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case (asynchronously)
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
|
@ -529,7 +529,7 @@ public class UserApi {
|
||||
}
|
||||
/**
|
||||
* Build call for getUserByName
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
@ -594,7 +594,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
@ -606,7 +606,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return ApiResponse<User>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
@ -619,7 +619,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name (asynchronously)
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -209,7 +209,7 @@ api.getUserByName()
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
*
|
||||
* @see #body client model (required)
|
||||
* return Client
|
||||
|
@ -348,7 +348,7 @@ public class UserApi {
|
||||
* Get user by user name
|
||||
*
|
||||
*
|
||||
* @see #usernamePath The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @see #usernamePath The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* return User
|
||||
*/
|
||||
public class GetUserByNameOper {
|
||||
@ -388,7 +388,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param username (String) The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username (String) The name that needs to be fetched. Use user1 for testing. (required)
|
||||
*/
|
||||
public GetUserByNameOper usernamePath(Object username) {
|
||||
reqSpec.addPathParam("username", username);
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException if fails to make API call
|
||||
|
@ -198,7 +198,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param body client model
|
||||
* @return Client
|
||||
|
@ -187,7 +187,7 @@ public class UserApi {
|
||||
* <p><b>200</b> - successful operation
|
||||
* <p><b>400</b> - Invalid username supplied
|
||||
* <p><b>404</b> - User not found
|
||||
* @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
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -206,7 +206,7 @@ Get user by user name
|
||||
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
@ -220,7 +220,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param body client model
|
||||
* @return Client
|
||||
|
@ -187,7 +187,7 @@ public class UserApi {
|
||||
* <p><b>200</b> - successful operation
|
||||
* <p><b>400</b> - Invalid username supplied
|
||||
* <p><b>404</b> - User not found
|
||||
* @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
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@ public interface FakeClassnameTags123Api {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* Sync method
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
*/
|
||||
|
@ -114,7 +114,7 @@ public interface UserApi {
|
||||
* Get user by user name
|
||||
* Sync method
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
*/
|
||||
|
||||
@ -126,7 +126,7 @@ public interface UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
* Async method
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param cb callback method
|
||||
*/
|
||||
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -22,7 +22,7 @@ import retrofit2.Response;
|
||||
public interface FakeClassnameTags123Api {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Call<Client>
|
||||
*/
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
public interface FakeClassnameTags123Api {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Call<Client>
|
||||
*/
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
public interface FakeClassnameTags123Api {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Observable<Client>
|
||||
*/
|
||||
|
@ -13,6 +13,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
|
@ -20,7 +20,7 @@ import java.util.Map;
|
||||
public interface FakeClassnameTags123Api {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Observable<Client>
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user