[python] Renames python generators (#7965)

* python->python-legacy, python-experimental->python

* test with openjdk8

* test with openjdk11

* comment out rm

* move kotlin tests to circleci

* move kotlin tests

* move tests to circleci

* fix circleci

* rearrange test

* move tests

* use wrapper

Co-authored-by: Justin Black <justin.a.black@gmail.com>
This commit is contained in:
William Cheng
2020-11-18 14:34:00 +08:00
committed by GitHub
parent c08f14500e
commit 3bf8ca7484
1213 changed files with 40106 additions and 38656 deletions

View File

@@ -24,10 +24,10 @@ This can only be done by the logged in user.
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from petstore_api.model.user import User
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -39,13 +39,23 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
body = petstore_api.User() # User | Created user object
api_instance = user_api.UserApi(api_client)
body = User(
id=1,
username="username_example",
first_name="first_name_example",
last_name="last_name_example",
email="email_example",
password="password_example",
phone="phone_example",
user_status=1,
) # User | Created user object
# example passing only required values which don't have defaults set
try:
# Create user
api_instance.create_user(body)
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->create_user: %s\n" % e)
```
@@ -53,7 +63,7 @@ with petstore_api.ApiClient() as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**body** | [**User**](User.md)| Created user object |
### Return type
@@ -83,10 +93,10 @@ Creates list of users with given input array
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from petstore_api.model.user import User
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -98,13 +108,25 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
body = [petstore_api.User()] # list[User] | List of user object
api_instance = user_api.UserApi(api_client)
body = [
User(
id=1,
username="username_example",
first_name="first_name_example",
last_name="last_name_example",
email="email_example",
password="password_example",
phone="phone_example",
user_status=1,
),
] # [User] | List of user object
# example passing only required values which don't have defaults set
try:
# Creates list of users with given input array
api_instance.create_users_with_array_input(body)
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
```
@@ -112,7 +134,7 @@ with petstore_api.ApiClient() as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object |
**body** | [**[User]**](User.md)| List of user object |
### Return type
@@ -142,10 +164,10 @@ Creates list of users with given input array
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from petstore_api.model.user import User
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -157,13 +179,25 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
body = [petstore_api.User()] # list[User] | List of user object
api_instance = user_api.UserApi(api_client)
body = [
User(
id=1,
username="username_example",
first_name="first_name_example",
last_name="last_name_example",
email="email_example",
password="password_example",
phone="phone_example",
user_status=1,
),
] # [User] | List of user object
# example passing only required values which don't have defaults set
try:
# Creates list of users with given input array
api_instance.create_users_with_list_input(body)
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
```
@@ -171,7 +205,7 @@ with petstore_api.ApiClient() as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object |
**body** | [**[User]**](User.md)| List of user object |
### Return type
@@ -203,10 +237,9 @@ This can only be done by the logged in user.
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -218,13 +251,14 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
username = 'username_example' # str | The name that needs to be deleted
api_instance = user_api.UserApi(api_client)
username = "username_example" # str | The name that needs to be deleted
# example passing only required values which don't have defaults set
try:
# Delete user
api_instance.delete_user(username)
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->delete_user: %s\n" % e)
```
@@ -232,7 +266,7 @@ with petstore_api.ApiClient() as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| The name that needs to be deleted |
**username** | **str**| The name that needs to be deleted |
### Return type
@@ -263,10 +297,10 @@ Get user by user name
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from petstore_api.model.user import User
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -278,14 +312,15 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
api_instance = user_api.UserApi(api_client)
username = "username_example" # str | The name that needs to be fetched. Use user1 for testing.
# example passing only required values which don't have defaults set
try:
# Get user by user name
api_response = api_instance.get_user_by_name(username)
pprint(api_response)
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->get_user_by_name: %s\n" % e)
```
@@ -293,7 +328,7 @@ with petstore_api.ApiClient() as api_client:
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
@@ -325,10 +360,9 @@ Logs user into the system
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -340,15 +374,16 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
username = 'username_example' # str | The user name for login
password = 'password_example' # str | The password for login in clear text
api_instance = user_api.UserApi(api_client)
username = "username_example" # str | The user name for login
password = "password_example" # str | The password for login in clear text
# example passing only required values which don't have defaults set
try:
# Logs user into the system
api_response = api_instance.login_user(username, password)
pprint(api_response)
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->login_user: %s\n" % e)
```
@@ -356,8 +391,8 @@ password = 'password_example' # str | The password for login in clear text
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| The user name for login |
**password** | **str**| The password for login in clear text |
**username** | **str**| The user name for login |
**password** | **str**| The password for login in clear text |
### Return type
@@ -388,10 +423,9 @@ Logs out current logged in user session
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -403,12 +437,13 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
api_instance = user_api.UserApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Logs out current logged in user session
api_instance.logout_user()
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->logout_user: %s\n" % e)
```
@@ -445,10 +480,10 @@ This can only be done by the logged in user.
### Example
```python
from __future__ import print_function
import time
import petstore_api
from petstore_api.rest import ApiException
from petstore_api.api import user_api
from petstore_api.model.user import User
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
@@ -460,14 +495,24 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.UserApi(api_client)
username = 'username_example' # str | name that need to be deleted
body = petstore_api.User() # User | Updated user object
api_instance = user_api.UserApi(api_client)
username = "username_example" # str | name that need to be deleted
body = User(
id=1,
username="username_example",
first_name="first_name_example",
last_name="last_name_example",
email="email_example",
password="password_example",
phone="phone_example",
user_status=1,
) # User | Updated user object
# example passing only required values which don't have defaults set
try:
# Updated user
api_instance.update_user(username, body)
except ApiException as e:
except petstore_api.ApiException as e:
print("Exception when calling UserApi->update_user: %s\n" % e)
```
@@ -475,8 +520,8 @@ body = petstore_api.User() # User | Updated user object
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**username** | **str**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
### Return type