William Cheng 5c275bccd2
Throw exception when config file missing (#4557)
* throw exception when config file missing

* fix bash config location
2019-11-22 14:01:57 +08:00

6.3 KiB

UserApi

All URIs are relative to /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

Create user

This can only be done by the logged in user.

Example

petstore-cli createUser

Parameters

Name Type Description Notes
user User Created user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not Applicable

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createUsersWithArrayInput

Creates list of users with given input array

Example

petstore-cli createUsersWithArrayInput

Parameters

Name Type Description Notes
user array[User] List of user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not Applicable

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createUsersWithListInput

Creates list of users with given input array

Example

petstore-cli createUsersWithListInput

Parameters

Name Type Description Notes
user array[User] List of user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not Applicable

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteUser

Delete user

This can only be done by the logged in user.

Example

petstore-cli deleteUser username=value

Parameters

Name Type Description Notes
username string The name that needs to be deleted [default to null]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: Not Applicable

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserByName

Get user by user name

Example

petstore-cli getUserByName username=value

Parameters

Name Type Description Notes
username string The name that needs to be fetched. Use user1 for testing. [default to null]

Return type

User

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

loginUser

Logs user into the system

Example

petstore-cli loginUser  username=value  password=value

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 Applicable
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

logoutUser

Logs out current logged in user session

Example

petstore-cli logoutUser

Parameters

This endpoint does not need any parameter.

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: Not Applicable

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUser

Updated user

This can only be done by the logged in user.

Example

petstore-cli updateUser username=value

Parameters

Name Type Description Notes
username string name that need to be deleted [default to null]
user User Updated user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not Applicable

[Back to top] [Back to API list] [Back to Model list] [Back to README]