forked from loafle/openapi-generator-original
Improve Java native, apache-httpclient with better spec (#14109)
* improve java native, apache client with better spec * fix java native async tests * regenerate java native tests
This commit is contained in:
@@ -25,7 +25,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
## createUser
|
||||
|
||||
> CompletableFuture<Void> createUser(body)
|
||||
> CompletableFuture<Void> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
@@ -48,9 +48,9 @@ public class Example {
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
User body = new User(); // User | Created user object
|
||||
User user = new User(); // User | Created user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.createUser(body);
|
||||
CompletableFuture<Void> result = apiInstance.createUser(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -67,7 +67,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [**User**](User.md)| Created user object | |
|
||||
| **user** | [**User**](User.md)| Created user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -80,7 +80,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
@@ -90,7 +90,7 @@ No authorization required
|
||||
|
||||
## createUserWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> createUser createUserWithHttpInfo(body)
|
||||
> CompletableFuture<ApiResponse<Void>> createUser createUserWithHttpInfo(user)
|
||||
|
||||
Create user
|
||||
|
||||
@@ -114,9 +114,9 @@ public class Example {
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
User body = new User(); // User | Created user object
|
||||
User user = new User(); // User | Created user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUserWithHttpInfo(body);
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUserWithHttpInfo(user);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
@@ -142,7 +142,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [**User**](User.md)| Created user object | |
|
||||
| **user** | [**User**](User.md)| Created user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -155,7 +155,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
@@ -166,10 +166,12 @@ No authorization required
|
||||
|
||||
## createUsersWithArrayInput
|
||||
|
||||
> CompletableFuture<Void> createUsersWithArrayInput(body)
|
||||
> CompletableFuture<Void> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -187,9 +189,9 @@ public class Example {
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.createUsersWithArrayInput(body);
|
||||
CompletableFuture<Void> result = apiInstance.createUsersWithArrayInput(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -206,7 +208,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [**List<User>**](User.md)| List of user object | |
|
||||
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -219,7 +221,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
@@ -229,10 +231,12 @@ No authorization required
|
||||
|
||||
## createUsersWithArrayInputWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(body)
|
||||
> CompletableFuture<ApiResponse<Void>> createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -251,9 +255,9 @@ public class Example {
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithArrayInputWithHttpInfo(body);
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithArrayInputWithHttpInfo(user);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
@@ -279,7 +283,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [**List<User>**](User.md)| List of user object | |
|
||||
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -292,7 +296,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
@@ -303,10 +307,12 @@ No authorization required
|
||||
|
||||
## createUsersWithListInput
|
||||
|
||||
> CompletableFuture<Void> createUsersWithListInput(body)
|
||||
> CompletableFuture<Void> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -324,9 +330,9 @@ public class Example {
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.createUsersWithListInput(body);
|
||||
CompletableFuture<Void> result = apiInstance.createUsersWithListInput(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -343,7 +349,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [**List<User>**](User.md)| List of user object | |
|
||||
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -356,7 +362,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
@@ -366,10 +372,12 @@ No authorization required
|
||||
|
||||
## createUsersWithListInputWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> createUsersWithListInput createUsersWithListInputWithHttpInfo(body)
|
||||
> CompletableFuture<ApiResponse<Void>> createUsersWithListInput createUsersWithListInputWithHttpInfo(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -388,9 +396,9 @@ public class Example {
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithListInputWithHttpInfo(body);
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithListInputWithHttpInfo(user);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
@@ -416,7 +424,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [**List<User>**](User.md)| List of user object | |
|
||||
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -429,7 +437,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
@@ -587,6 +595,8 @@ No authorization required
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -653,6 +663,8 @@ No authorization required
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -730,6 +742,8 @@ No authorization required
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -797,6 +811,8 @@ No authorization required
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -875,6 +891,8 @@ No authorization required
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -934,6 +952,8 @@ No authorization required
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -1000,7 +1020,7 @@ No authorization required
|
||||
|
||||
## updateUser
|
||||
|
||||
> CompletableFuture<Void> updateUser(username, body)
|
||||
> CompletableFuture<Void> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
@@ -1024,9 +1044,9 @@ public class Example {
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | name that need to be deleted
|
||||
User body = new User(); // User | Updated user object
|
||||
User user = new User(); // User | Updated user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.updateUser(username, body);
|
||||
CompletableFuture<Void> result = apiInstance.updateUser(username, user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -1044,7 +1064,7 @@ public class Example {
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **username** | **String**| name that need to be deleted | |
|
||||
| **body** | [**User**](User.md)| Updated user object | |
|
||||
| **user** | [**User**](User.md)| Updated user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -1057,7 +1077,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
@@ -1068,7 +1088,7 @@ No authorization required
|
||||
|
||||
## updateUserWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> updateUser updateUserWithHttpInfo(username, body)
|
||||
> CompletableFuture<ApiResponse<Void>> updateUser updateUserWithHttpInfo(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
@@ -1093,9 +1113,9 @@ public class Example {
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | name that need to be deleted
|
||||
User body = new User(); // User | Updated user object
|
||||
User user = new User(); // User | Updated user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.updateUserWithHttpInfo(username, body);
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.updateUserWithHttpInfo(username, user);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
@@ -1122,7 +1142,7 @@ public class Example {
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **username** | **String**| name that need to be deleted | |
|
||||
| **body** | [**User**](User.md)| Updated user object | |
|
||||
| **user** | [**User**](User.md)| Updated user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -1135,7 +1155,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
|
||||
Reference in New Issue
Block a user