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