mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-11-04 02:33:54 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			5.0 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			5.0 KiB
		
	
	
	
	
	
	
	
UserApi
All URIs are relative to http://petstore.swagger.io/v2
| Method | HTTP request | Description | 
|---|---|---|
| createUser | POST /user | Create user | 
| createUsersWithArrayInput | POST /user/createWithArray | Creates list of users with given input array | 
| createUsersWithListInput | POST /user/createWithList | Creates list of users with given input array | 
| deleteUser | DELETE /user/{username} | Delete user | 
| getUserByName | GET /user/{username} | Get user by user name | 
| loginUser | GET /user/login | Logs user into the system | 
| logoutUser | GET /user/logout | Logs out current logged in user session | 
| updateUser | PUT /user/{username} | Updated user | 
createUser
createUser(User)
Create user
This can only be done by the logged in user.
Parameters
| Name | Type | Description | Notes | 
|---|---|---|---|
| User | User | Created user object | 
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
 - Accept: Not defined
 
createUsersWithArrayInput
createUsersWithArrayInput(User)
Creates list of users with given input array
Parameters
| Name | Type | Description | Notes | 
|---|---|---|---|
| User | List | List of user object | 
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
 - Accept: Not defined
 
createUsersWithListInput
createUsersWithListInput(User)
Creates list of users with given input array
Parameters
| Name | Type | Description | Notes | 
|---|---|---|---|
| User | List | List of user object | 
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
 - Accept: Not defined
 
deleteUser
deleteUser(username)
Delete user
This can only be done by the logged in user.
Parameters
| Name | Type | Description | Notes | 
|---|---|---|---|
| username | String | The name that needs to be deleted | [default to null] | 
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
 - Accept: Not defined
 
getUserByName
User getUserByName(username)
Get user by user name
Parameters
| Name | Type | Description | Notes | 
|---|---|---|---|
| username | String | The name that needs to be fetched. Use user1 for testing. | [default to null] | 
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
 - Accept: application/xml, application/json
 
loginUser
String loginUser(username, password)
Logs user into the system
Parameters
| Name | Type | Description | Notes | 
|---|---|---|---|
| username | String | The user name for login | [default to null] | 
| password | String | The password for login in clear text | [default to null] | 
Return type
String
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
 - Accept: application/xml, application/json
 
logoutUser
logoutUser()
Logs out current logged in user session
Parameters
This endpoint does not need any parameter.
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
 - Accept: Not defined
 
updateUser
updateUser(username, User)
Updated user
This can only be done by the logged in user.
Parameters
| Name | Type | Description | Notes | 
|---|---|---|---|
| username | String | name that need to be deleted | [default to null] | 
| User | User | Updated user object | 
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
 - Accept: Not defined