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:
@@ -17,7 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
## createUser
|
||||
|
||||
> createUser(body)
|
||||
> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
@@ -39,9 +39,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 {
|
||||
apiInstance.createUser(body);
|
||||
apiInstance.createUser(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -58,7 +58,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [**User**](User.md)| Created user object | |
|
||||
| **user** | [**User**](User.md)| Created user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -70,7 +70,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@@ -82,10 +82,12 @@ No authorization required
|
||||
|
||||
## createUsersWithArrayInput
|
||||
|
||||
> createUsersWithArrayInput(body)
|
||||
> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -102,9 +104,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 {
|
||||
apiInstance.createUsersWithArrayInput(body);
|
||||
apiInstance.createUsersWithArrayInput(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -121,7 +123,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
|
||||
|
||||
@@ -133,7 +135,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@@ -145,10 +147,12 @@ No authorization required
|
||||
|
||||
## createUsersWithListInput
|
||||
|
||||
> createUsersWithListInput(body)
|
||||
> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -165,9 +169,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 {
|
||||
apiInstance.createUsersWithListInput(body);
|
||||
apiInstance.createUsersWithListInput(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -184,7 +188,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
|
||||
|
||||
@@ -196,7 +200,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@@ -278,6 +282,8 @@ No authorization required
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -344,6 +350,8 @@ No authorization required
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -411,6 +419,8 @@ No authorization required
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
@@ -466,7 +476,7 @@ No authorization required
|
||||
|
||||
## updateUser
|
||||
|
||||
> updateUser(username, body)
|
||||
> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
@@ -489,9 +499,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 {
|
||||
apiInstance.updateUser(username, body);
|
||||
apiInstance.updateUser(username, user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -509,7 +519,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
|
||||
|
||||
@@ -521,7 +531,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user