forked from loafle/openapi-generator-original
fix swift mapping with int and number
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# swagger_client\UserApi
|
||||
# swagger_client.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
@@ -23,11 +23,10 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -35,7 +34,7 @@ body = swagger_client.User() # User | Created user object (optional)
|
||||
|
||||
try:
|
||||
# Create user
|
||||
api_instance.create_user(body=body);
|
||||
api_instance.create_user(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->create_user: %s\n" % e
|
||||
```
|
||||
@@ -70,11 +69,10 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -82,7 +80,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
api_instance.create_users_with_array_input(body=body);
|
||||
api_instance.create_users_with_array_input(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->create_users_with_array_input: %s\n" % e
|
||||
```
|
||||
@@ -117,11 +115,10 @@ Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -129,7 +126,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
api_instance.create_users_with_list_input(body=body);
|
||||
api_instance.create_users_with_list_input(body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->create_users_with_list_input: %s\n" % e
|
||||
```
|
||||
@@ -164,11 +161,10 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# Configure HTTP basic authorization: test_http_basic
|
||||
swagger_client.configuration.username = 'YOUR_USERNAME'
|
||||
@@ -180,7 +176,7 @@ username = 'username_example' # str | The name that needs to be deleted
|
||||
|
||||
try:
|
||||
# Delete user
|
||||
api_instance.delete_user(username);
|
||||
api_instance.delete_user(username)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->delete_user: %s\n" % e
|
||||
```
|
||||
@@ -215,19 +211,18 @@ Get user by user name
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
||||
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try:
|
||||
# Get user by user name
|
||||
api_response = api_instance.get_user_by_name(username);
|
||||
api_response = api_instance.get_user_by_name(username)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->get_user_by_name: %s\n" % e
|
||||
@@ -237,7 +232,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **str**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -263,11 +258,10 @@ Logs user into the system
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -276,7 +270,7 @@ password = 'password_example' # str | The password for login in clear text (opti
|
||||
|
||||
try:
|
||||
# Logs user into the system
|
||||
api_response = api_instance.login_user(username=username, password=password);
|
||||
api_response = api_instance.login_user(username=username, password=password)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->login_user: %s\n" % e
|
||||
@@ -313,18 +307,17 @@ Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
|
||||
try:
|
||||
# Logs out current logged in user session
|
||||
api_instance.logout_user();
|
||||
api_instance.logout_user()
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->logout_user: %s\n" % e
|
||||
```
|
||||
@@ -356,11 +349,10 @@ This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```python
|
||||
import time
|
||||
import swagger_client
|
||||
from swagger_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_client.UserApi()
|
||||
@@ -369,7 +361,7 @@ body = swagger_client.User() # User | Updated user object (optional)
|
||||
|
||||
try:
|
||||
# Updated user
|
||||
api_instance.update_user(username, body=body);
|
||||
api_instance.update_user(username, body=body)
|
||||
except ApiException as e:
|
||||
print "Exception when calling UserApi->update_user: %s\n" % e
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user