From 6578cef2600e7242cde375882586adce003df755 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Fri, 28 Jun 2019 15:23:25 +0530 Subject: [PATCH] [python] : Make example code snippet compilable (#3148) * feat(python): Making example compilable * feat(python): Updating pet project * feat(python): Updating comments * feat(documentation): Fixing comments style * feat(documentation): Updating documentation * feat(documentation): Fixing comments style --- .../resources/python/api_doc_example.mustache | 6 ++-- .../resources/python/common_README.mustache | 4 ++- .../client/petstore/python-asyncio/README.md | 4 ++- .../python-asyncio/docs/AnotherFakeApi.md | 2 +- .../petstore/python-asyncio/docs/FakeApi.md | 28 ++++++++------- .../docs/FakeClassnameTags123Api.md | 4 ++- .../petstore/python-asyncio/docs/PetApi.md | 36 ++++++++++++++----- .../petstore/python-asyncio/docs/StoreApi.md | 10 +++--- .../petstore/python-asyncio/docs/UserApi.md | 16 ++++----- .../client/petstore/python-tornado/README.md | 4 ++- .../python-tornado/docs/AnotherFakeApi.md | 2 +- .../petstore/python-tornado/docs/FakeApi.md | 28 ++++++++------- .../docs/FakeClassnameTags123Api.md | 4 ++- .../petstore/python-tornado/docs/PetApi.md | 36 ++++++++++++++----- .../petstore/python-tornado/docs/StoreApi.md | 10 +++--- .../petstore/python-tornado/docs/UserApi.md | 16 ++++----- samples/client/petstore/python/README.md | 4 ++- .../petstore/python/docs/AnotherFakeApi.md | 2 +- .../client/petstore/python/docs/FakeApi.md | 28 ++++++++------- .../python/docs/FakeClassnameTags123Api.md | 4 ++- samples/client/petstore/python/docs/PetApi.md | 36 ++++++++++++++----- .../client/petstore/python/docs/StoreApi.md | 10 +++--- .../client/petstore/python/docs/UserApi.md | 16 ++++----- .../openapi3/client/petstore/python/README.md | 4 ++- .../petstore/python/docs/AnotherFakeApi.md | 2 +- .../client/petstore/python/docs/DefaultApi.md | 2 +- .../client/petstore/python/docs/FakeApi.md | 30 +++++++++------- .../python/docs/FakeClassnameTags123Api.md | 4 ++- .../client/petstore/python/docs/PetApi.md | 36 ++++++++++++++----- .../client/petstore/python/docs/StoreApi.md | 10 +++--- .../client/petstore/python/docs/UserApi.md | 16 ++++----- 31 files changed, 262 insertions(+), 152 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache index c8f0d8b554ad..f2d6117a7ce1 100644 --- a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache @@ -6,13 +6,15 @@ from {{{packageName}}}.rest import ApiException from pprint import pprint {{> python_doc_auth_partial}} {{#hasAuthMethods}} -# create an instance of the API class +# Defining host is optional and default to {{{basePath}}} +configuration.host = "{{{basePath}}}" +# Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} {{/hasAuthMethods}} {{^hasAuthMethods}} -# create an instance of the API class +# Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}() {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/python/common_README.mustache b/modules/openapi-generator/src/main/resources/python/common_README.mustache index d8e9f94c5846..7238703c4bbd 100644 --- a/modules/openapi-generator/src/main/resources/python/common_README.mustache +++ b/modules/openapi-generator/src/main/resources/python/common_README.mustache @@ -6,7 +6,9 @@ from {{{packageName}}}.rest import ApiException from pprint import pprint {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} {{> python_doc_auth_partial}} -# create an instance of the API class +# Defining host is optional and default to {{{basePath}}} +configuration.host = "{{{basePath}}}" +# Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index 221acfa588f7..27a0490dc04e 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -52,7 +52,9 @@ from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md b/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md index c3f84772cfd6..3be4009a7d14 100644 --- a/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi() body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index 946a8ce3e77d..3aa6aadb2b78 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -35,7 +35,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body @@ -88,7 +88,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = True # bool | Input boolean as post body (optional) @@ -141,7 +141,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) @@ -194,7 +194,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 3.4 # float | Input number as post body (optional) @@ -247,7 +247,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 'body_example' # str | Input string as post body (optional) @@ -300,7 +300,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | @@ -350,7 +350,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() query = 'query_example' # str | body = petstore_api.User() # User | @@ -404,7 +404,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.Client() # Client | client model @@ -463,7 +463,9 @@ configuration = petstore_api.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) number = 3.4 # float | None double = 3.4 # float | None @@ -543,7 +545,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') @@ -611,7 +613,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters @@ -672,7 +674,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() param = {'key': 'param_example'} # dict(str, str) | request body @@ -723,7 +725,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 diff --git a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md index 7ffcf2112243..2fae5e0c7766 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md @@ -29,7 +29,9 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key_query'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md index 3ed2551bd64b..e4df08ee37aa 100644 --- a/samples/client/petstore/python-asyncio/docs/PetApi.md +++ b/samples/client/petstore/python-asyncio/docs/PetApi.md @@ -33,7 +33,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -89,7 +91,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) @@ -149,7 +153,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) status = ['status_example'] # list[str] | Status values that need to be considered for filter @@ -208,7 +214,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) tags = ['tags_example'] # list[str] | Tags to filter by @@ -269,7 +277,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to return @@ -327,7 +337,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -385,7 +397,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) @@ -444,7 +458,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) @@ -504,7 +520,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload diff --git a/samples/client/petstore/python-asyncio/docs/StoreApi.md b/samples/client/petstore/python-asyncio/docs/StoreApi.md index 76b94f73dcf7..a2f4ece3e3ff 100644 --- a/samples/client/petstore/python-asyncio/docs/StoreApi.md +++ b/samples/client/petstore/python-asyncio/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -86,7 +86,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) try: @@ -136,7 +138,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 56 # int | ID of pet that needs to be fetched @@ -190,7 +192,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() body = petstore_api.Order() # Order | order placed for purchasing the pet diff --git a/samples/client/petstore/python-asyncio/docs/UserApi.md b/samples/client/petstore/python-asyncio/docs/UserApi.md index 783bb991ce1c..3ea4a2ef605e 100644 --- a/samples/client/petstore/python-asyncio/docs/UserApi.md +++ b/samples/client/petstore/python-asyncio/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = petstore_api.User() # User | Created user object @@ -81,7 +81,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = [petstore_api.User()] # list[User] | List of user object @@ -132,7 +132,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = [petstore_api.User()] # list[User] | List of user object @@ -185,7 +185,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be deleted @@ -237,7 +237,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -291,7 +291,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text @@ -346,7 +346,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() try: @@ -395,7 +395,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | name that need to be deleted body = petstore_api.User() # User | Updated user object diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md index 221acfa588f7..27a0490dc04e 100644 --- a/samples/client/petstore/python-tornado/README.md +++ b/samples/client/petstore/python-tornado/README.md @@ -52,7 +52,9 @@ from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md b/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md index c3f84772cfd6..3be4009a7d14 100644 --- a/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python-tornado/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi() body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md index 946a8ce3e77d..3aa6aadb2b78 100644 --- a/samples/client/petstore/python-tornado/docs/FakeApi.md +++ b/samples/client/petstore/python-tornado/docs/FakeApi.md @@ -35,7 +35,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body @@ -88,7 +88,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = True # bool | Input boolean as post body (optional) @@ -141,7 +141,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) @@ -194,7 +194,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 3.4 # float | Input number as post body (optional) @@ -247,7 +247,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 'body_example' # str | Input string as post body (optional) @@ -300,7 +300,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | @@ -350,7 +350,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() query = 'query_example' # str | body = petstore_api.User() # User | @@ -404,7 +404,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.Client() # Client | client model @@ -463,7 +463,9 @@ configuration = petstore_api.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) number = 3.4 # float | None double = 3.4 # float | None @@ -543,7 +545,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') @@ -611,7 +613,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters @@ -672,7 +674,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() param = {'key': 'param_example'} # dict(str, str) | request body @@ -723,7 +725,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 diff --git a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md index 7ffcf2112243..2fae5e0c7766 100644 --- a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md @@ -29,7 +29,9 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key_query'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md index 3ed2551bd64b..e4df08ee37aa 100644 --- a/samples/client/petstore/python-tornado/docs/PetApi.md +++ b/samples/client/petstore/python-tornado/docs/PetApi.md @@ -33,7 +33,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -89,7 +91,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) @@ -149,7 +153,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) status = ['status_example'] # list[str] | Status values that need to be considered for filter @@ -208,7 +214,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) tags = ['tags_example'] # list[str] | Tags to filter by @@ -269,7 +277,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to return @@ -327,7 +337,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -385,7 +397,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) @@ -444,7 +458,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) @@ -504,7 +520,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload diff --git a/samples/client/petstore/python-tornado/docs/StoreApi.md b/samples/client/petstore/python-tornado/docs/StoreApi.md index 76b94f73dcf7..a2f4ece3e3ff 100644 --- a/samples/client/petstore/python-tornado/docs/StoreApi.md +++ b/samples/client/petstore/python-tornado/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -86,7 +86,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) try: @@ -136,7 +138,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 56 # int | ID of pet that needs to be fetched @@ -190,7 +192,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() body = petstore_api.Order() # Order | order placed for purchasing the pet diff --git a/samples/client/petstore/python-tornado/docs/UserApi.md b/samples/client/petstore/python-tornado/docs/UserApi.md index 783bb991ce1c..3ea4a2ef605e 100644 --- a/samples/client/petstore/python-tornado/docs/UserApi.md +++ b/samples/client/petstore/python-tornado/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = petstore_api.User() # User | Created user object @@ -81,7 +81,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = [petstore_api.User()] # list[User] | List of user object @@ -132,7 +132,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = [petstore_api.User()] # list[User] | List of user object @@ -185,7 +185,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be deleted @@ -237,7 +237,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -291,7 +291,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text @@ -346,7 +346,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() try: @@ -395,7 +395,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | name that need to be deleted body = petstore_api.User() # User | Updated user object diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 221acfa588f7..27a0490dc04e 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -52,7 +52,9 @@ from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python/docs/AnotherFakeApi.md b/samples/client/petstore/python/docs/AnotherFakeApi.md index c3f84772cfd6..3be4009a7d14 100644 --- a/samples/client/petstore/python/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi() body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 946a8ce3e77d..3aa6aadb2b78 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -35,7 +35,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() xml_item = petstore_api.XmlItem() # XmlItem | XmlItem Body @@ -88,7 +88,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = True # bool | Input boolean as post body (optional) @@ -141,7 +141,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) @@ -194,7 +194,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 3.4 # float | Input number as post body (optional) @@ -247,7 +247,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 'body_example' # str | Input string as post body (optional) @@ -300,7 +300,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | @@ -350,7 +350,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() query = 'query_example' # str | body = petstore_api.User() # User | @@ -404,7 +404,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = petstore_api.Client() # Client | client model @@ -463,7 +463,9 @@ configuration = petstore_api.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) number = 3.4 # float | None double = 3.4 # float | None @@ -543,7 +545,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') @@ -611,7 +613,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters @@ -672,7 +674,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() param = {'key': 'param_example'} # dict(str, str) | request body @@ -723,7 +725,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 diff --git a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md index 7ffcf2112243..2fae5e0c7766 100644 --- a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -29,7 +29,9 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key_query'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) body = petstore_api.Client() # Client | client model diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index 3ed2551bd64b..e4df08ee37aa 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -33,7 +33,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -89,7 +91,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) @@ -149,7 +153,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) status = ['status_example'] # list[str] | Status values that need to be considered for filter @@ -208,7 +214,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) tags = ['tags_example'] # list[str] | Tags to filter by @@ -269,7 +277,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to return @@ -327,7 +337,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) body = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -385,7 +397,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) @@ -444,7 +458,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) @@ -504,7 +520,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md index 76b94f73dcf7..a2f4ece3e3ff 100644 --- a/samples/client/petstore/python/docs/StoreApi.md +++ b/samples/client/petstore/python/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -86,7 +86,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) try: @@ -136,7 +138,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 56 # int | ID of pet that needs to be fetched @@ -190,7 +192,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() body = petstore_api.Order() # Order | order placed for purchasing the pet diff --git a/samples/client/petstore/python/docs/UserApi.md b/samples/client/petstore/python/docs/UserApi.md index 783bb991ce1c..3ea4a2ef605e 100644 --- a/samples/client/petstore/python/docs/UserApi.md +++ b/samples/client/petstore/python/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = petstore_api.User() # User | Created user object @@ -81,7 +81,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = [petstore_api.User()] # list[User] | List of user object @@ -132,7 +132,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() body = [petstore_api.User()] # list[User] | List of user object @@ -185,7 +185,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be deleted @@ -237,7 +237,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -291,7 +291,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text @@ -346,7 +346,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() try: @@ -395,7 +395,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | name that need to be deleted body = petstore_api.User() # User | Updated user object diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index ce0d8c8d9c53..d10f52f9f630 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -52,7 +52,9 @@ from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(petstore_api.ApiClient(configuration)) client = petstore_api.Client() # Client | client model diff --git a/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md index 754a0529e092..9f419af3441d 100644 --- a/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.AnotherFakeApi() client = petstore_api.Client() # Client | client model diff --git a/samples/openapi3/client/petstore/python/docs/DefaultApi.md b/samples/openapi3/client/petstore/python/docs/DefaultApi.md index e1f8818b40b4..92e27f40a24c 100644 --- a/samples/openapi3/client/petstore/python/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/python/docs/DefaultApi.md @@ -21,7 +21,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.DefaultApi() try: diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index 6c317500c822..6e5c94782952 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -33,7 +33,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() try: @@ -83,7 +83,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = True # bool | Input boolean as post body (optional) @@ -136,7 +136,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() outer_composite = petstore_api.OuterComposite() # OuterComposite | Input composite as post body (optional) @@ -189,7 +189,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 3.4 # float | Input number as post body (optional) @@ -242,7 +242,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() body = 'body_example' # str | Input string as post body (optional) @@ -295,7 +295,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() file_schema_test_class = petstore_api.FileSchemaTestClass() # FileSchemaTestClass | @@ -345,7 +345,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() query = 'query_example' # str | user = petstore_api.User() # User | @@ -399,7 +399,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() client = petstore_api.Client() # Client | client model @@ -458,7 +458,9 @@ configuration = petstore_api.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) number = 3.4 # float | None double = 3.4 # float | None @@ -538,7 +540,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() enum_header_string_array = ['enum_header_string_array_example'] # list[str] | Header parameter enum test (string array) (optional) enum_header_string = '-efg' # str | Header parameter enum test (string) (optional) (default to '-efg') @@ -610,7 +612,9 @@ configuration = petstore_api.Configuration() # Configure Bearer authorization (JWT): bearer_test configuration.access_token = 'YOUR_BEARER_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeApi(petstore_api.ApiClient(configuration)) required_string_group = 56 # int | Required String in group parameters required_boolean_group = True # bool | Required Boolean in group parameters @@ -671,7 +675,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() request_body = {'key': 'request_body_example'} # dict(str, str) | request body @@ -722,7 +726,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.FakeApi() param = 'param_example' # str | field1 param2 = 'param2_example' # str | field2 diff --git a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md index bb9189d4928a..5397122203be 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -29,7 +29,9 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key_query'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.FakeClassnameTags123Api(petstore_api.ApiClient(configuration)) client = petstore_api.Client() # Client | client model diff --git a/samples/openapi3/client/petstore/python/docs/PetApi.md b/samples/openapi3/client/petstore/python/docs/PetApi.md index 1f6f17ddb248..5bbf43d4c291 100644 --- a/samples/openapi3/client/petstore/python/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/PetApi.md @@ -33,7 +33,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -88,7 +90,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | Pet id to delete api_key = 'api_key_example' # str | (optional) @@ -147,7 +151,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) status = ['status_example'] # list[str] | Status values that need to be considered for filter @@ -206,7 +212,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) tags = ['tags_example'] # list[str] | Tags to filter by @@ -267,7 +275,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to return @@ -325,7 +335,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet = petstore_api.Pet() # Pet | Pet object that needs to be added to the store @@ -382,7 +394,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet that needs to be updated name = 'name_example' # str | Updated name of the pet (optional) @@ -441,7 +455,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) @@ -501,7 +517,9 @@ configuration = petstore_api.Configuration() # Configure OAuth2 access token for authorization: petstore_auth configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) pet_id = 56 # int | ID of pet to update required_file = '/path/to/file' # file | file to upload diff --git a/samples/openapi3/client/petstore/python/docs/StoreApi.md b/samples/openapi3/client/petstore/python/docs/StoreApi.md index ee56106ba083..aa2aafec8052 100644 --- a/samples/openapi3/client/petstore/python/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -86,7 +86,9 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['api_key'] = 'Bearer' -# create an instance of the API class +# Defining host is optional and default to http://petstore.swagger.io:80/v2 +configuration.host = "http://petstore.swagger.io:80/v2" +# Create an instance of the API class api_instance = petstore_api.StoreApi(petstore_api.ApiClient(configuration)) try: @@ -136,7 +138,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order_id = 56 # int | ID of pet that needs to be fetched @@ -190,7 +192,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.StoreApi() order = petstore_api.Order() # Order | order placed for purchasing the pet diff --git a/samples/openapi3/client/petstore/python/docs/UserApi.md b/samples/openapi3/client/petstore/python/docs/UserApi.md index 0003f8850522..cd3eee511500 100644 --- a/samples/openapi3/client/petstore/python/docs/UserApi.md +++ b/samples/openapi3/client/petstore/python/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() user = petstore_api.User() # User | Created user object @@ -81,7 +81,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() user = [petstore_api.User()] # list[User] | List of user object @@ -132,7 +132,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() user = [petstore_api.User()] # list[User] | List of user object @@ -185,7 +185,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be deleted @@ -237,7 +237,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -291,7 +291,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | The user name for login password = 'password_example' # str | The password for login in clear text @@ -346,7 +346,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() try: @@ -395,7 +395,7 @@ import petstore_api from petstore_api.rest import ApiException from pprint import pprint -# create an instance of the API class +# Create an instance of the API class api_instance = petstore_api.UserApi() username = 'username_example' # str | name that need to be deleted user = petstore_api.User() # User | Updated user object