[python-experimental] Quicken package loading (#6437)

* apis and models contains all apis and models, omits loading them in the package namespace

* Runs git add -a and commits it

* Fixes test_outer_enum.py

* Fixes test_fruit.py

* Updates test_fruit and test_mammal

* Fixes test_parent_pet

* Updates test_discard_unknown_properties.py

* Updates test_deserialization.py

* Updates v2 docs md files for apis + the readme

* Fixes v2 tests

* v2 doc updates

* Updates v3 docs

* Reverts python_doc_auth_partial.mustache

* Adds sys to v3 tests

* Adds FILES update

Co-authored-by: Justin Black <justinblack@justins-air.lan>
This commit is contained in:
Justin Black
2020-06-01 00:25:37 -07:00
committed by GitHub
parent 6783b90fe2
commit d8c422398e
363 changed files with 2503 additions and 2005 deletions

View File

@@ -20,6 +20,8 @@ To test special tags and operation ID starting with number
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import another_fake_api
from petstore_api.model import client
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.
@@ -31,8 +33,8 @@ 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.AnotherFakeApi(api_client)
client_client = petstore_api.Client() # client.Client | client model
api_instance = another_fake_api.AnotherFakeApi(api_client)
client_client = client.Client() # client.Client | client model
# example passing only required values which don't have defaults set
try:

View File

@@ -18,6 +18,8 @@ Method | HTTP request | Description
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import default_api
from petstore_api.model import inline_response_default
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.
@@ -29,7 +31,7 @@ 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.DefaultApi(api_client)
api_instance = default_api.DefaultApi(api_client)
# example, this endpoint has no required or optional parameters
try:

View File

@@ -31,6 +31,8 @@ Health check endpoint
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_api
from petstore_api.model import health_check_result
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.
@@ -42,7 +44,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
# example, this endpoint has no required or optional parameters
try:
@@ -89,6 +91,7 @@ Test serialization of outer boolean types
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -100,7 +103,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
body = True # bool | Input boolean as post body (optional)
# example passing only required values which don't have defaults set
@@ -151,6 +154,8 @@ Test serialization of object with outer number type
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_api
from petstore_api.model import outer_composite
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.
@@ -162,8 +167,8 @@ 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.FakeApi(api_client)
outer_composite_outer_composite = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional)
api_instance = fake_api.FakeApi(api_client)
outer_composite_outer_composite = outer_composite.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional)
# example passing only required values which don't have defaults set
# and optional values
@@ -213,6 +218,7 @@ Test serialization of outer number types
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -224,7 +230,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
body = 3.4 # float | Input number as post body (optional)
# example passing only required values which don't have defaults set
@@ -275,6 +281,7 @@ Test serialization of outer string types
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -286,7 +293,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
body = 'body_example' # str | Input string as post body (optional)
# example passing only required values which don't have defaults set
@@ -337,6 +344,8 @@ For this test, the body for this request much reference a schema named `File`.
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_api
from petstore_api.model import file_schema_test_class
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.
@@ -348,8 +357,8 @@ 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.FakeApi(api_client)
file_schema_test_class_file_schema_test_class = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass |
api_instance = fake_api.FakeApi(api_client)
file_schema_test_class_file_schema_test_class = file_schema_test_class.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass |
# example passing only required values which don't have defaults set
try:
@@ -395,6 +404,8 @@ No authorization required
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_api
from petstore_api.model 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.
@@ -406,9 +417,9 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
query = 'query_example' # str |
user_user = petstore_api.User() # user.User |
user_user = user.User() # user.User |
# example passing only required values which don't have defaults set
try:
@@ -457,6 +468,8 @@ To test \"client\" model
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_api
from petstore_api.model import client
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.
@@ -468,8 +481,8 @@ 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.FakeApi(api_client)
client_client = petstore_api.Client() # client.Client | client model
api_instance = fake_api.FakeApi(api_client)
client_client = client.Client() # client.Client | client model
# example passing only required values which don't have defaults set
try:
@@ -520,6 +533,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -541,7 +555,7 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
number = 3.4 # float | None
double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
@@ -626,6 +640,7 @@ To test enum parameters
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -637,7 +652,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional)
enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) if omitted the server will use the default value of '-efg'
enum_query_string_array = ['enum_query_string_array_example'] # [str] | Query parameter enum test (string array) (optional)
@@ -704,6 +719,7 @@ Fake endpoint to test group parameters (optional)
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -724,7 +740,7 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
required_string_group = 56 # int | Required String in group parameters
required_boolean_group = True # bool | Required Boolean in group parameters
required_int64_group = 56 # int | Required Integer in group parameters
@@ -790,6 +806,7 @@ test inline additionalProperties
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -801,7 +818,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
request_body = {'key': 'request_body_example'} # {str: (str,)} | request body
# example passing only required values which don't have defaults set
@@ -849,6 +866,7 @@ test json serialization of form data
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -860,7 +878,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
param = 'param_example' # str | field1
param2 = 'param2_example' # str | field2
@@ -912,6 +930,7 @@ To test the collection format in query parameters
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_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.
@@ -923,7 +942,7 @@ 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.FakeApi(api_client)
api_instance = fake_api.FakeApi(api_client)
pipe = ['pipe_example'] # [str] |
ioutil = ['ioutil_example'] # [str] |
http = ['http_example'] # [str] |

View File

@@ -21,6 +21,8 @@ To test class name in snake case
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import fake_classname_tags_123_api
from petstore_api.model import client
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.
@@ -46,8 +48,8 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeClassnameTags123Api(api_client)
client_client = petstore_api.Client() # client.Client | client model
api_instance = fake_classname_tags_123_api.FakeClassnameTags123Api(api_client)
client_client = client.Client() # client.Client | client model
# example passing only required values which don't have defaults set
try:

View File

@@ -27,6 +27,8 @@ Add a new pet to the store
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_api
from petstore_api.model import pet
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.
@@ -108,8 +110,8 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
pet_pet = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store
api_instance = pet_api.PetApi(api_client)
pet_pet = pet.Pet() # pet.Pet | Pet object that needs to be added to the store
# example passing only required values which don't have defaults set
try:
@@ -157,6 +159,7 @@ Deletes a pet
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_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.
@@ -178,7 +181,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
api_instance = pet_api.PetApi(api_client)
pet_id = 56 # int | Pet id to delete
api_key = 'api_key_example' # str | (optional)
@@ -239,6 +242,8 @@ Multiple status values can be provided with comma separated strings
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_api
from petstore_api.model import pet
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.
@@ -320,7 +325,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
api_instance = pet_api.PetApi(api_client)
status = ['status_example'] # [str] | Status values that need to be considered for filter
# example passing only required values which don't have defaults set
@@ -373,6 +378,8 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_api
from petstore_api.model import pet
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.
@@ -454,7 +461,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
api_instance = pet_api.PetApi(api_client)
tags = ['tags_example'] # [str] | Tags to filter by
# example passing only required values which don't have defaults set
@@ -507,6 +514,8 @@ Returns a single pet
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_api
from petstore_api.model import pet
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.
@@ -532,7 +541,7 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
api_instance = pet_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to return
# example passing only required values which don't have defaults set
@@ -584,6 +593,8 @@ Update an existing pet
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_api
from petstore_api.model import pet
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.
@@ -665,8 +676,8 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
pet_pet = petstore_api.Pet() # pet.Pet | Pet object that needs to be added to the store
api_instance = pet_api.PetApi(api_client)
pet_pet = pet.Pet() # pet.Pet | Pet object that needs to be added to the store
# example passing only required values which don't have defaults set
try:
@@ -716,6 +727,7 @@ Updates a pet in the store with form data
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_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.
@@ -737,7 +749,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
api_instance = pet_api.PetApi(api_client)
pet_id = 56 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
status = 'status_example' # str | Updated status of the pet (optional)
@@ -798,6 +810,8 @@ uploads an image
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_api
from petstore_api.model import api_response
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.
@@ -819,7 +833,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
api_instance = pet_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
file = open('/path/to/file', 'rb') # file_type | file to upload (optional)
@@ -882,6 +896,8 @@ uploads an image (required)
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import pet_api
from petstore_api.model import api_response
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.
@@ -903,7 +919,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
api_instance = pet_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
required_file = open('/path/to/file', 'rb') # file_type | file to upload
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)

View File

@@ -23,6 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import store_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.
@@ -34,7 +35,7 @@ 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.StoreApi(api_client)
api_instance = store_api.StoreApi(api_client)
order_id = 'order_id_example' # str | ID of the order that needs to be deleted
# example passing only required values which don't have defaults set
@@ -86,6 +87,7 @@ Returns a map of status codes to quantities
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import store_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.
@@ -111,7 +113,7 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.StoreApi(api_client)
api_instance = store_api.StoreApi(api_client)
# example, this endpoint has no required or optional parameters
try:
@@ -158,6 +160,8 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import store_api
from petstore_api.model import order
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.
@@ -169,7 +173,7 @@ 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.StoreApi(api_client)
api_instance = store_api.StoreApi(api_client)
order_id = 56 # int | ID of pet that needs to be fetched
# example passing only required values which don't have defaults set
@@ -220,6 +224,8 @@ Place an order for a pet
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import store_api
from petstore_api.model import order
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.
@@ -231,8 +237,8 @@ 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.StoreApi(api_client)
order_order = petstore_api.Order() # order.Order | order placed for purchasing the pet
api_instance = store_api.StoreApi(api_client)
order_order = order.Order() # order.Order | order placed for purchasing the pet
# example passing only required values which don't have defaults set
try:

View File

@@ -27,6 +27,8 @@ This can only be done by the logged in user.
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import user_api
from petstore_api.model 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.
@@ -38,8 +40,8 @@ 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)
user_user = petstore_api.User() # user.User | Created user object
api_instance = user_api.UserApi(api_client)
user_user = user.User() # user.User | Created user object
# example passing only required values which don't have defaults set
try:
@@ -86,6 +88,8 @@ Creates list of users with given input array
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import user_api
from petstore_api.model 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.
@@ -97,8 +101,8 @@ 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)
user_user = [petstore_api.User()] # [user.User] | List of user object
api_instance = user_api.UserApi(api_client)
user_user = [user.User()] # [user.User] | List of user object
# example passing only required values which don't have defaults set
try:
@@ -145,6 +149,8 @@ Creates list of users with given input array
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import user_api
from petstore_api.model 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.
@@ -156,8 +162,8 @@ 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)
user_user = [petstore_api.User()] # [user.User] | List of user object
api_instance = user_api.UserApi(api_client)
user_user = [user.User()] # [user.User] | List of user object
# example passing only required values which don't have defaults set
try:
@@ -206,6 +212,7 @@ This can only be done by the logged in user.
from __future__ import print_function
import time
import petstore_api
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.
@@ -217,7 +224,7 @@ 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)
username = 'username_example' # str | The name that needs to be deleted
# example passing only required values which don't have defaults set
@@ -266,6 +273,8 @@ Get user by user name
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import user_api
from petstore_api.model 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.
@@ -277,7 +286,7 @@ 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)
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
@@ -328,6 +337,7 @@ Logs user into the system
from __future__ import print_function
import time
import petstore_api
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.
@@ -339,7 +349,7 @@ 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)
username = 'username_example' # str | The user name for login
password = 'password_example' # str | The password for login in clear text
@@ -391,6 +401,7 @@ Logs out current logged in user session
from __future__ import print_function
import time
import petstore_api
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.
@@ -402,7 +413,7 @@ 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:
@@ -448,6 +459,8 @@ This can only be done by the logged in user.
from __future__ import print_function
import time
import petstore_api
from petstore_api.api import user_api
from petstore_api.model 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.
@@ -459,9 +472,9 @@ 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)
username = 'username_example' # str | name that need to be deleted
user_user = petstore_api.User() # user.User | Updated user object
user_user = user.User() # user.User | Updated user object
# example passing only required values which don't have defaults set
try: