diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index de12108b76..efc51ae9b3 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 */ diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java index 3a6c328819..cc174ebb54 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java @@ -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}") diff --git a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/google-api-client/docs/UserApi.md b/samples/client/petstore/java/google-api-client/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/google-api-client/docs/UserApi.md +++ b/samples/client/petstore/java/google-api-client/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 382b570aad..ce9e8752e5 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -39,6 +39,7 @@ public class FakeClassnameTags123Api { } /** + * To test class name in snake case * To test class name in snake case *

200 - 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 *

200 - successful operation * @param body client model diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java index 898e085fa1..fcea0fd7ed 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java @@ -324,7 +324,7 @@ public class UserApi { *

200 - successful operation *

400 - Invalid username supplied *

404 - 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 { *

200 - successful operation *

400 - Invalid username supplied *

404 - 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 diff --git a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/jersey1/docs/UserApi.md b/samples/client/petstore/java/jersey1/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/jersey1/docs/UserApi.md +++ b/samples/client/petstore/java/jersey1/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 6c847ecf49..16e52ea7a0 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java index 05b9c65bf4..5d44eb9cd8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java @@ -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 */ diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java index 31d74a9e57..36feb989ae 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java @@ -63,9 +63,6 @@ public class ApiClient { protected Map authentications; - protected int statusCode; - protected Map> 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> 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 invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType 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> 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; diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiResponse.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiResponse.java new file mode 100644 index 0000000000..389c0b199b --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiResponse.java @@ -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 The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> 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> 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> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/AnotherFakeApi.java index 494f81b84d..a4201c9391 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -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 testSpecialTagsWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java index 2980f8bb1f..293591710e 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java @@ -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 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 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 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 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 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 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 enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List 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 testEnumParametersWithHttpInfo(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List 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 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 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); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 41b78ca652..4c15c19f41 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 testClassnameWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java index 6af9763779..e2cca5b3ee 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java @@ -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 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 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 findPetsByStatus(List 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> findPetsByStatusWithHttpInfo(List status) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -172,6 +207,19 @@ public class PetApi { */ @Deprecated public List findPetsByTags(List 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> findPetsByTagsWithHttpInfo(List 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 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 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 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 uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java index 22be0ebb02..ede729d954 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java @@ -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 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 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> 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 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 placeOrderWithHttpInfo(Order body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java index a7dced63d8..6535ce1042 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java @@ -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 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 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 createUsersWithArrayInputWithHttpInfo(List 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 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 createUsersWithListInputWithHttpInfo(List 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 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 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 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 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 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); } } diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java index b734109873..ba800f4230 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java @@ -64,9 +64,6 @@ public class ApiClient { protected Map authentications; - protected int statusCode; - protected Map> 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> 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 invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType 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> 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; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiResponse.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiResponse.java new file mode 100644 index 0000000000..389c0b199b --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiResponse.java @@ -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 The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> 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> 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> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java index 494f81b84d..a4201c9391 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -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 testSpecialTagsWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java index 250114eb25..23ed9fc99b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java @@ -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 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 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 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 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 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 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 enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List 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 testEnumParametersWithHttpInfo(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List 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 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 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); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 41b78ca652..4c15c19f41 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 testClassnameWithHttpInfo(Client body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java index 6af9763779..e2cca5b3ee 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java @@ -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 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 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 findPetsByStatus(List 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> findPetsByStatusWithHttpInfo(List status) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -172,6 +207,19 @@ public class PetApi { */ @Deprecated public List findPetsByTags(List 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> findPetsByTagsWithHttpInfo(List 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 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 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 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 uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java index 22be0ebb02..ede729d954 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java @@ -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 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 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> 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 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 placeOrderWithHttpInfo(Order body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java index a7dced63d8..6535ce1042 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java @@ -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 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 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 createUsersWithArrayInputWithHttpInfo(List 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 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 createUsersWithListInputWithHttpInfo(List 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 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 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 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 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 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); } } diff --git a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/jersey2/docs/UserApi.md b/samples/client/petstore/java/jersey2/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/jersey2/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index c27bda18a6..4c15c19f41 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java index 034fab71b5..6535ce1042 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java @@ -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 */ diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index cd516030e2..e8114ca34c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/UserApi.java index d0f16373be..518d851e31 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/UserApi.java @@ -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 diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/okhttp-gson/docs/UserApi.md b/samples/client/petstore/java/okhttp-gson/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/UserApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index cd516030e2..e8114ca34c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java index d0f16373be..518d851e31 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java @@ -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 diff --git a/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md index dcedef8fb0..a98b6ab652 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/rest-assured/docs/UserApi.md b/samples/client/petstore/java/rest-assured/docs/UserApi.md index 1746a18167..1bf14094eb 100644 --- a/samples/client/petstore/java/rest-assured/docs/UserApi.md +++ b/samples/client/petstore/java/rest-assured/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 349997f7ba..dd57a83a03 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 diff --git a/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/UserApi.java index b854fdf531..c3eed3d9ce 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/io/swagger/client/api/UserApi.java @@ -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); diff --git a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/resteasy/docs/UserApi.md b/samples/client/petstore/java/resteasy/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/resteasy/docs/UserApi.md +++ b/samples/client/petstore/java/resteasy/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index af57069037..81d87f96db 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java index 7602f4e2ba..41c494040e 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java @@ -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 */ diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 59eaddcedb..7d5016df7e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -47,7 +47,7 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case - * + * To test class name in snake case *

200 - successful operation * @param body client model * @return Client diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/UserApi.java index 3e2d1ac00a..019d802e21 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/api/UserApi.java @@ -187,7 +187,7 @@ public class UserApi { *

200 - successful operation *

400 - Invalid username supplied *

404 - 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 */ diff --git a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md index bc728bfce5..eb030817b5 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/resttemplate/docs/UserApi.md b/samples/client/petstore/java/resttemplate/docs/UserApi.md index 2e6987951c..1c5218ac12 100644 --- a/samples/client/petstore/java/resttemplate/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 59eaddcedb..7d5016df7e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -47,7 +47,7 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case - * + * To test class name in snake case *

200 - successful operation * @param body client model * @return Client diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/UserApi.java index 3e2d1ac00a..019d802e21 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/api/UserApi.java @@ -187,7 +187,7 @@ public class UserApi { *

200 - successful operation *

400 - Invalid username supplied *

404 - 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 */ diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 0b7cd1bc1e..cde2b07d4b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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 */ diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java index 4eb592928f..fe85e9b479 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java @@ -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 */ diff --git a/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md index 715fed0dc0..6b6078b2af 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 1aef86538f..b3640b889a 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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> */ diff --git a/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md index 715fed0dc0..6b6078b2af 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 022fd8118b..5fddb84307 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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> */ diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md index 715fed0dc0..6b6078b2af 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2rx/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 884b9b6f6d..c22e2a0e58 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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> */ diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md index 715fed0dc0..6b6078b2af 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeClassnameTags123Api.md @@ -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: diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 8ff0a91ce9..835ffeb534 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -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> */