From c6837ed42ba6b8d6d80bd99b99dd6ba23b86487b Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Thu, 6 Feb 2020 13:58:17 -0800 Subject: [PATCH] [Python] 5094 followup - Reduce redundancy in docs (#5161) * Reduce redundancy in python docs This is a followup to PR #5094, which had a few unresolved comments at merge time. This reduces the amount of redundant lines in the api example doc templates, and ensures that referenced Configuration objects are actually instantiated. * Regenerate samples --- .../resources/python/api_doc_example.mustache | 11 ++----- .../api_doc_example.mustache | 11 ++----- .../python/python_doc_auth_partial.mustache | 3 ++ .../petstore/python-asyncio/docs/FakeApi.md | 1 + .../docs/FakeClassnameTags123Api.md | 1 + .../petstore/python-asyncio/docs/PetApi.md | 9 ++++++ .../petstore/python-asyncio/docs/StoreApi.md | 1 + .../docs/AnotherFakeApi.md | 2 +- .../python-experimental/docs/FakeApi.md | 29 ++++++++++--------- .../docs/FakeClassnameTags123Api.md | 1 + .../python-experimental/docs/PetApi.md | 9 ++++++ .../python-experimental/docs/StoreApi.md | 7 +++-- .../python-experimental/docs/UserApi.md | 16 +++++----- .../petstore/python-tornado/docs/FakeApi.md | 1 + .../docs/FakeClassnameTags123Api.md | 1 + .../petstore/python-tornado/docs/PetApi.md | 9 ++++++ .../petstore/python-tornado/docs/StoreApi.md | 1 + .../client/petstore/python/docs/FakeApi.md | 1 + .../python/docs/FakeClassnameTags123Api.md | 1 + samples/client/petstore/python/docs/PetApi.md | 9 ++++++ .../client/petstore/python/docs/StoreApi.md | 1 + .../docs/AnotherFakeApi.md | 2 +- .../python-experimental/docs/DefaultApi.md | 2 +- .../python-experimental/docs/FakeApi.md | 26 +++++++++-------- .../docs/FakeClassnameTags123Api.md | 1 + .../python-experimental/docs/PetApi.md | 9 ++++++ .../python-experimental/docs/StoreApi.md | 7 +++-- .../python-experimental/docs/UserApi.md | 16 +++++----- .../client/petstore/python/docs/FakeApi.md | 2 ++ .../python/docs/FakeClassnameTags123Api.md | 1 + .../client/petstore/python/docs/PetApi.md | 9 ++++++ .../client/petstore/python/docs/StoreApi.md | 1 + 32 files changed, 133 insertions(+), 68 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 e86c5d6011cc..dadb8f6a96b5 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 @@ -5,24 +5,17 @@ import {{{packageName}}} from {{{packageName}}}.rest import ApiException from pprint import pprint {{> python_doc_auth_partial}} -{{#hasAuthMethods}} -# Defining host is optional and default to {{{basePath}}} -configuration.host = "{{{basePath}}}" # Enter a context with an instance of the API client +{{#hasAuthMethods}} with {{{packageName}}}.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = {{{packageName}}}.{{{classname}}}(api_client) - {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/allParams}} {{/hasAuthMethods}} {{^hasAuthMethods}} -# Enter a context with an instance of the API client with {{{packageName}}}.ApiClient() as api_client: +{{/hasAuthMethods}} # Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}(api_client) {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} -{{/hasAuthMethods}} try: {{#summary}} # {{{.}}} diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache index 565d00a3b9e9..ae7b8a697970 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api_doc_example.mustache @@ -4,20 +4,15 @@ import time import {{{packageName}}} from pprint import pprint {{> python_doc_auth_partial}} -{{#hasAuthMethods}} -# Defining host is optional and default to {{{basePath}}} -configuration.host = "{{{basePath}}}" # Enter a context with an instance of the API client +{{#hasAuthMethods}} with {{{packageName}}}.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = {{{packageName}}}.{{{classname}}}(api_client) {{/hasAuthMethods}} {{^hasAuthMethods}} -# Enter a context with an instance of the API client -with {{{packageName}}}.ApiClient(configuration) as api_client: +with {{{packageName}}}.ApiClient() as api_client: +{{/hasAuthMethods}} # Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}(api_client) -{{/hasAuthMethods}} {{#requiredParams}}{{^defaultValue}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}} {{/defaultValue}}{{/requiredParams}}{{#optionalParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} {{/optionalParams}} diff --git a/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache b/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache index 9f5b49f82147..d8cfc4ad11df 100644 --- a/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache +++ b/modules/openapi-generator/src/main/resources/python/python_doc_auth_partial.mustache @@ -45,4 +45,7 @@ configuration.api_key['{{{keyParamName}}}'] = 'YOUR_API_KEY' configuration.access_token = 'YOUR_ACCESS_TOKEN' {{/isOAuth}} {{/authMethods}} + +# Defining host is optional and default to {{{basePath}}} +configuration.host = "{{{basePath}}}" {{/hasAuthMethods}} diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index 9ea1aa2a6b18..d1d84afd1ce7 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -482,6 +482,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md index 3ea79928f2ac..160851b5c31c 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-asyncio/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md index 45129d6d620e..5e9f9804ee00 100644 --- a/samples/client/petstore/python-asyncio/docs/PetApi.md +++ b/samples/client/petstore/python-asyncio/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -95,6 +96,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -159,6 +161,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -222,6 +225,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -287,6 +291,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -349,6 +354,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -411,6 +417,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -474,6 +481,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -538,6 +546,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-asyncio/docs/StoreApi.md b/samples/client/petstore/python-asyncio/docs/StoreApi.md index 285953422d22..360d7e01865e 100644 --- a/samples/client/petstore/python-asyncio/docs/StoreApi.md +++ b/samples/client/petstore/python-asyncio/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md index cd0e35819a19..493dd47a4cf3 100644 --- a/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md +++ b/samples/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(api_client) body = petstore_api.Client() # client.Client | client model diff --git a/samples/client/petstore/python-experimental/docs/FakeApi.md b/samples/client/petstore/python-experimental/docs/FakeApi.md index bbe8aaccecdf..59b07dd05a0a 100644 --- a/samples/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/client/petstore/python-experimental/docs/FakeApi.md @@ -37,7 +37,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) xml_item = petstore_api.XmlItem() # xml_item.XmlItem | XmlItem Body @@ -92,7 +92,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = True # bool | Input boolean as post body (optional) @@ -148,7 +148,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.OuterComposite() # outer_composite.OuterComposite | Input composite as post body (optional) @@ -204,7 +204,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.OuterEnum("placed") # outer_enum.OuterEnum | Input enum as post body (optional) @@ -260,7 +260,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.OuterNumber(3.4) # outer_number.OuterNumber | Input number as post body (optional) @@ -316,7 +316,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = 'body_example' # str | Input string as post body (optional) @@ -372,7 +372,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.FileSchemaTestClass() # file_schema_test_class.FileSchemaTestClass | @@ -424,7 +424,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) query = 'query_example' # str | @@ -480,7 +480,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = petstore_api.Client() # client.Client | client model @@ -536,7 +536,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) @@ -599,6 +599,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -690,7 +691,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) @@ -761,7 +762,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) required_string_group = 56 # int | Required String in group parameters @@ -832,7 +833,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) param = {'key': 'param_example'} # {str: (str,)} | request body @@ -885,7 +886,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) param = 'param_example' # str | field1 diff --git a/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md index 658e9ca6220f..1b5308a8199a 100644 --- a/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -30,6 +30,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-experimental/docs/PetApi.md b/samples/client/petstore/python-experimental/docs/PetApi.md index 8ff3853e3959..c7f69f794b5c 100644 --- a/samples/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/client/petstore/python-experimental/docs/PetApi.md @@ -34,6 +34,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -94,6 +95,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -166,6 +168,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -229,6 +232,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -294,6 +298,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -356,6 +361,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -418,6 +424,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -489,6 +496,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -564,6 +572,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-experimental/docs/StoreApi.md b/samples/client/petstore/python-experimental/docs/StoreApi.md index ed8692abf57a..efcc4a3ea287 100644 --- a/samples/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/client/petstore/python-experimental/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -89,6 +89,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -142,7 +143,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 56 # int | ID of pet that needs to be fetched @@ -198,7 +199,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) body = petstore_api.Order() # order.Order | order placed for purchasing the pet diff --git a/samples/client/petstore/python-experimental/docs/UserApi.md b/samples/client/petstore/python-experimental/docs/UserApi.md index 318a1b5827dd..4473840b5ce7 100644 --- a/samples/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/client/petstore/python-experimental/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) body = petstore_api.User() # user.User | Created user object @@ -83,7 +83,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) body = [petstore_api.User()] # [user.User] | List of user object @@ -136,7 +136,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) body = [petstore_api.User()] # [user.User] | List of user object @@ -191,7 +191,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be deleted @@ -245,7 +245,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -301,7 +301,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The user name for login @@ -358,7 +358,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) @@ -409,7 +409,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | name that need to be deleted diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md index 9ea1aa2a6b18..d1d84afd1ce7 100644 --- a/samples/client/petstore/python-tornado/docs/FakeApi.md +++ b/samples/client/petstore/python-tornado/docs/FakeApi.md @@ -482,6 +482,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md index 3ea79928f2ac..160851b5c31c 100644 --- a/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python-tornado/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md index 45129d6d620e..5e9f9804ee00 100644 --- a/samples/client/petstore/python-tornado/docs/PetApi.md +++ b/samples/client/petstore/python-tornado/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -95,6 +96,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -159,6 +161,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -222,6 +225,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -287,6 +291,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -349,6 +354,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -411,6 +417,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -474,6 +481,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -538,6 +546,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python-tornado/docs/StoreApi.md b/samples/client/petstore/python-tornado/docs/StoreApi.md index 285953422d22..360d7e01865e 100644 --- a/samples/client/petstore/python-tornado/docs/StoreApi.md +++ b/samples/client/petstore/python-tornado/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 9ea1aa2a6b18..d1d84afd1ce7 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -482,6 +482,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md index 3ea79928f2ac..160851b5c31c 100644 --- a/samples/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index 45129d6d620e..5e9f9804ee00 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -95,6 +96,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -159,6 +161,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -222,6 +225,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -287,6 +291,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -349,6 +354,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -411,6 +417,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -474,6 +481,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -538,6 +546,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md index 285953422d22..360d7e01865e 100644 --- a/samples/client/petstore/python/docs/StoreApi.md +++ b/samples/client/petstore/python/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md index 4c159f9f10c5..831230e18c65 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AnotherFakeApi.md @@ -23,7 +23,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md index 17513301ccc8..080fe8bd98bb 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DefaultApi.md @@ -21,7 +21,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.DefaultApi(api_client) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md index 3fd53419eb7d..c1146038a232 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeApi.md @@ -34,7 +34,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) @@ -86,7 +86,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = True # bool | Input boolean as post body (optional) @@ -142,7 +142,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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) @@ -198,7 +198,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = 3.4 # float | Input number as post body (optional) @@ -254,7 +254,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) body = 'body_example' # str | Input string as post body (optional) @@ -310,7 +310,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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 | @@ -362,7 +362,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) query = 'query_example' # str | @@ -418,7 +418,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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 @@ -480,6 +480,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -571,7 +572,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) enum_header_string_array = ['enum_header_string_array_example'] # [str] | Header parameter enum test (string array) (optional) @@ -647,6 +648,7 @@ configuration.access_token = 'YOUR_BEARER_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -719,7 +721,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) request_body = {'key': 'request_body_example'} # {str: (str,)} | request body @@ -772,7 +774,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) param = 'param_example' # str | field1 @@ -829,7 +831,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.FakeApi(api_client) pipe = ['pipe_example'] # [str] | diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md index 74d3bf84f757..a93336558a92 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FakeClassnameTags123Api.md @@ -30,6 +30,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md index 1f8dddead6de..72f7fb27fc30 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md @@ -55,6 +55,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -114,6 +115,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -206,6 +208,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -290,6 +293,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -355,6 +359,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -438,6 +443,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -499,6 +505,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -570,6 +577,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -643,6 +651,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md index 8ef71bd8fc74..4372edd56540 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/StoreApi.md @@ -26,7 +26,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 'order_id_example' # str | ID of the order that needs to be deleted @@ -89,6 +89,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -142,7 +143,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.StoreApi(api_client) order_id = 56 # int | ID of pet that needs to be fetched @@ -198,7 +199,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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 diff --git a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md index 720e4a41a461..70c5e1232ac7 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/UserApi.md @@ -30,7 +30,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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 @@ -83,7 +83,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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 @@ -136,7 +136,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as 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 @@ -191,7 +191,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be deleted @@ -245,7 +245,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. @@ -301,7 +301,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | The user name for login @@ -358,7 +358,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) @@ -409,7 +409,7 @@ import petstore_api from pprint import pprint # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = petstore_api.UserApi(api_client) username = 'username_example' # str | name that need to be deleted diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index c17ac031d413..e1b0e67d4230 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -477,6 +477,7 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -635,6 +636,7 @@ configuration.access_token = 'YOUR_BEARER_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md index 3606bdea3aa1..bf60f00c6a0d 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/python/docs/FakeClassnameTags123Api.md @@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/openapi3/client/petstore/python/docs/PetApi.md b/samples/openapi3/client/petstore/python/docs/PetApi.md index 40d68d83cdba..eafac6a400de 100644 --- a/samples/openapi3/client/petstore/python/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/PetApi.md @@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -94,6 +95,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -157,6 +159,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -220,6 +223,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -285,6 +289,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -347,6 +352,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -408,6 +414,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -471,6 +478,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 @@ -535,6 +543,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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 diff --git a/samples/openapi3/client/petstore/python/docs/StoreApi.md b/samples/openapi3/client/petstore/python/docs/StoreApi.md index 5f5d3ef34118..9bfe9d95bf77 100644 --- a/samples/openapi3/client/petstore/python/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/StoreApi.md @@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY' # Defining host is optional and default to http://petstore.swagger.io:80/v2 configuration.host = "http://petstore.swagger.io:80/v2" + # 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