wing328 4cb7f1d613 [Rust] add new Rust client generator (#6105)
* add rust generator (1st release)

* update based on feedback

* fix reserved keyword

* fix string parameter

* Convert String to &str in trait definition

* Only pass pathParams to uri builder

* Fixed the html escaping in return type

* Fixed the hashmap constructor

* Added models into API scope

* removed models subimport, reference from super

* update returntype in method signature

* Fixed the remaining templates inconsistencies

* Fixed issues that floated up in kubernetes swagger file

* add hash support, fix docstring

* fix map parameter, update api.mustache

* use baseName for parameter

* use fully-qualfiied model name

* add rust tests

* fix test cases

* Rust gen slightly more idiomatic (#6247)

* Go -> Rust in README

* Remove leftover go file in rust sample

* rust: Regenerate sample

* rust: Rename *Impl -> *Client

* rust: one-line use line

More in line with common style

* rust: Replace tabs (in java) with 4 spaces

* Added trivial getter implementation (#6249)

* update rust petstore samples
2017-08-06 16:59:08 +08:00

6.2 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(body) Create user

This can only be done by the logged in user.

Required Parameters

Name Type Description Notes
body User Created user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

CreateUsersWithArrayInput

CreateUsersWithArrayInput(body) Creates list of users with given input array

Required Parameters

Name Type Description Notes
body Vec<::models::User> List of user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

CreateUsersWithListInput

CreateUsersWithListInput(body) Creates list of users with given input array

Required Parameters

Name Type Description Notes
body Vec<::models::User> List of user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

DeleteUser

DeleteUser(username) Delete user

This can only be done by the logged in user.

Required Parameters

Name Type Description Notes
username String The name that needs to be deleted

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

GetUserByName

::models::User GetUserByName(username) Get user by user name

Required Parameters

Name Type Description Notes
username String The name that needs to be fetched. Use user1 for testing.

Return type

::models::User

Authorization

No authorization required

HTTP request headers

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

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

LoginUser

String LoginUser(username, password) Logs user into the system

Required Parameters

Name Type Description Notes
username String The user name for login
password String The password for login in clear text

Return type

String

Authorization

No authorization required

HTTP request headers

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

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

LogoutUser

LogoutUser() Logs out current logged in user session

Required Parameters

This endpoint does not need any parameter.

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

UpdateUser

UpdateUser(username, body) Updated user

This can only be done by the logged in user.

Required Parameters

Name Type Description Notes
username String name that need to be deleted
body User Updated user object

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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