diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 60ec9ff0a42d..5d937ec32a7d 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -82,26 +82,27 @@ class {{classname}}(object): returns the request thread. """ + local_var_params = locals() + all_params = [{{#allParams}}'{{paramName}}'{{#hasMore}}, {{/hasMore}}{{/allParams}}] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method {{operationId}}" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] {{#allParams}} {{#required}} # verify the required parameter '{{paramName}}' is set - if ('{{paramName}}' not in params or - params['{{paramName}}'] is None): + if ('{{paramName}}' not in local_var_params or + local_var_params['{{paramName}}'] is None): raise ValueError("Missing the required parameter `{{paramName}}` when calling `{{operationId}}`") # noqa: E501 {{/required}} {{/allParams}} @@ -109,35 +110,35 @@ class {{classname}}(object): {{#allParams}} {{#hasValidation}} {{#maxLength}} - if ('{{paramName}}' in params and - len(params['{{paramName}}']) > {{maxLength}}): + if ('{{paramName}}' in local_var_params and + len(local_var_params['{{paramName}}']) > {{maxLength}}): raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be less than or equal to `{{maxLength}}`") # noqa: E501 {{/maxLength}} {{#minLength}} - if ('{{paramName}}' in params and - len(params['{{paramName}}']) < {{minLength}}): + if ('{{paramName}}' in local_var_params and + len(local_var_params['{{paramName}}']) < {{minLength}}): raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be greater than or equal to `{{minLength}}`") # noqa: E501 {{/minLength}} {{#maximum}} - if '{{paramName}}' in params and params['{{paramName}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 + if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}`{{maximum}}`") # noqa: E501 {{/maximum}} {{#minimum}} - if '{{paramName}}' in params and params['{{paramName}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 + if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501 {{/minimum}} {{#pattern}} - if '{{paramName}}' in params and not re.search('{{{vendorExtensions.x-regex}}}', params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + if '{{paramName}}' in local_var_params and not re.search('{{{vendorExtensions.x-regex}}}', local_var_params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must conform to the pattern `{{{pattern}}}`") # noqa: E501 {{/pattern}} {{#maxItems}} - if ('{{paramName}}' in params and - len(params['{{paramName}}']) > {{maxItems}}): + if ('{{paramName}}' in local_var_params and + len(local_var_params['{{paramName}}']) > {{maxItems}}): raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be less than or equal to `{{maxItems}}`") # noqa: E501 {{/maxItems}} {{#minItems}} - if ('{{paramName}}' in params and - len(params['{{paramName}}']) < {{minItems}}): + if ('{{paramName}}' in local_var_params and + len(local_var_params['{{paramName}}']) < {{minItems}}): raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be greater than or equal to `{{minItems}}`") # noqa: E501 {{/minItems}} {{/hasValidation}} @@ -148,37 +149,37 @@ class {{classname}}(object): path_params = {} {{#pathParams}} - if '{{paramName}}' in params: - path_params['{{baseName}}'] = params['{{paramName}}']{{#isListContainer}} # noqa: E501 + if '{{paramName}}' in local_var_params: + path_params['{{baseName}}'] = local_var_params['{{paramName}}']{{#isListContainer}} # noqa: E501 collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501 {{/pathParams}} query_params = [] {{#queryParams}} - if '{{paramName}}' in params: - query_params.append(('{{baseName}}', params['{{paramName}}'])){{#isListContainer}} # noqa: E501 + if '{{paramName}}' in local_var_params: + query_params.append(('{{baseName}}', local_var_params['{{paramName}}'])){{#isListContainer}} # noqa: E501 collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501 {{/queryParams}} header_params = {} {{#headerParams}} - if '{{paramName}}' in params: - header_params['{{baseName}}'] = params['{{paramName}}']{{#isListContainer}} # noqa: E501 + if '{{paramName}}' in local_var_params: + header_params['{{baseName}}'] = local_var_params['{{paramName}}']{{#isListContainer}} # noqa: E501 collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501 {{/headerParams}} form_params = [] local_var_files = {} {{#formParams}} - if '{{paramName}}' in params: - {{^isFile}}form_params.append(('{{baseName}}', params['{{paramName}}'])){{/isFile}}{{#isFile}}local_var_files['{{baseName}}'] = params['{{paramName}}']{{/isFile}}{{#isListContainer}} # noqa: E501 + if '{{paramName}}' in local_var_params: + {{^isFile}}form_params.append(('{{baseName}}', local_var_params['{{paramName}}'])){{/isFile}}{{#isFile}}local_var_files['{{baseName}}'] = local_var_params['{{paramName}}']{{/isFile}}{{#isListContainer}} # noqa: E501 collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501 {{/formParams}} body_params = None {{#bodyParam}} - if '{{paramName}}' in params: - body_params = params['{{paramName}}'] + if '{{paramName}}' in local_var_params: + body_params = local_var_params['{{paramName}}'] {{/bodyParam}} {{#hasProduces}} # HTTP header `Accept` @@ -205,10 +206,10 @@ class {{classname}}(object): files=local_var_files, response_type={{#returnType}}'{{returnType}}'{{/returnType}}{{^returnType}}None{{/returnType}}, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) {{/operation}} {{/operations}} diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index a0cd9f0ccb01..dde25ef08e8c 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.0 \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index 3f1efdf68bd8..6211d6d90a22 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py @@ -70,24 +70,25 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_special_tags" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_special_tags`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -125,8 +126,8 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py index 7c83ca0d064e..ef08af751e96 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py @@ -70,21 +70,22 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_boolean_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -98,8 +99,8 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -117,10 +118,10 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='bool', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_composite_serialize(self, **kwargs): # noqa: E501 @@ -161,21 +162,22 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['outer_composite'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_composite_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -189,8 +191,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'outer_composite' in params: - body_params = params['outer_composite'] + if 'outer_composite' in local_var_params: + body_params = local_var_params['outer_composite'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -208,10 +210,10 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterComposite', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_number_serialize(self, **kwargs): # noqa: E501 @@ -252,21 +254,22 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_number_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -280,8 +283,8 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -299,10 +302,10 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='float', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_string_serialize(self, **kwargs): # noqa: E501 @@ -343,21 +346,22 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_string_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -371,8 +375,8 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -390,10 +394,10 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_body_with_file_schema(self, file_schema_test_class, **kwargs): # noqa: E501 @@ -434,24 +438,25 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw returns the request thread. """ + local_var_params = locals() + all_params = ['file_schema_test_class'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_body_with_file_schema" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'file_schema_test_class' is set - if ('file_schema_test_class' not in params or - params['file_schema_test_class'] is None): + if ('file_schema_test_class' not in local_var_params or + local_var_params['file_schema_test_class'] is None): raise ValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -466,8 +471,8 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw local_var_files = {} body_params = None - if 'file_schema_test_class' in params: - body_params = params['file_schema_test_class'] + if 'file_schema_test_class' in local_var_params: + body_params = local_var_params['file_schema_test_class'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -485,10 +490,10 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_body_with_query_params(self, query, user, **kwargs): # noqa: E501 @@ -529,28 +534,29 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # returns the request thread. """ + local_var_params = locals() + all_params = ['query', 'user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_body_with_query_params" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): + if ('query' not in local_var_params or + local_var_params['query'] is None): raise ValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -558,8 +564,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # path_params = {} query_params = [] - if 'query' in params: - query_params.append(('query', params['query'])) # noqa: E501 + if 'query' in local_var_params: + query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -567,8 +573,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -586,10 +592,10 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_client_model(self, client, **kwargs): # noqa: E501 @@ -630,24 +636,25 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_client_model" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -662,8 +669,8 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -685,10 +692,10 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 @@ -755,65 +762,66 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou returns the request thread. """ + local_var_params = locals() + all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password', 'param_callback'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_endpoint_parameters" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in params or - params['number'] is None): + if ('number' not in local_var_params or + local_var_params['number'] is None): raise ValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in params or - params['double'] is None): + if ('double' not in local_var_params or + local_var_params['double'] is None): raise ValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in params or - params['pattern_without_delimiter'] is None): + if ('pattern_without_delimiter' not in local_var_params or + local_var_params['pattern_without_delimiter'] is None): raise ValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in params or - params['byte'] is None): + if ('byte' not in local_var_params or + local_var_params['byte'] is None): raise ValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in params and params['number'] > 543.2: # noqa: E501 + if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in params and params['number'] < 32.1: # noqa: E501 + if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in params and params['double'] > 123.4: # noqa: E501 + if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 - if 'double' in params and params['double'] < 67.8: # noqa: E501 + if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in params and not re.search('^[A-Z].*', params['pattern_without_delimiter']): # noqa: E501 + if 'pattern_without_delimiter' in local_var_params and not re.search('^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 - if 'integer' in params and params['integer'] > 100: # noqa: E501 + if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in params and params['integer'] < 10: # noqa: E501 + if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in params and params['int32'] > 200: # noqa: E501 + if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in params and params['int32'] < 20: # noqa: E501 + if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in params and params['float'] > 987.6: # noqa: E501 + if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501 + if 'string' in local_var_params and not re.search('[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 - if ('password' in params and - len(params['password']) > 64): + if ('password' in local_var_params and + len(local_var_params['password']) > 64): raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in params and - len(params['password']) < 10): + if ('password' in local_var_params and + len(local_var_params['password']) < 10): raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -825,34 +833,34 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou form_params = [] local_var_files = {} - if 'integer' in params: - form_params.append(('integer', params['integer'])) # noqa: E501 - if 'int32' in params: - form_params.append(('int32', params['int32'])) # noqa: E501 - if 'int64' in params: - form_params.append(('int64', params['int64'])) # noqa: E501 - if 'number' in params: - form_params.append(('number', params['number'])) # noqa: E501 - if 'float' in params: - form_params.append(('float', params['float'])) # noqa: E501 - if 'double' in params: - form_params.append(('double', params['double'])) # noqa: E501 - if 'string' in params: - form_params.append(('string', params['string'])) # noqa: E501 - if 'pattern_without_delimiter' in params: - form_params.append(('pattern_without_delimiter', params['pattern_without_delimiter'])) # noqa: E501 - if 'byte' in params: - form_params.append(('byte', params['byte'])) # noqa: E501 - if 'binary' in params: - local_var_files['binary'] = params['binary'] # noqa: E501 - if 'date' in params: - form_params.append(('date', params['date'])) # noqa: E501 - if 'date_time' in params: - form_params.append(('dateTime', params['date_time'])) # noqa: E501 - if 'password' in params: - form_params.append(('password', params['password'])) # noqa: E501 - if 'param_callback' in params: - form_params.append(('callback', params['param_callback'])) # noqa: E501 + if 'integer' in local_var_params: + form_params.append(('integer', local_var_params['integer'])) # noqa: E501 + if 'int32' in local_var_params: + form_params.append(('int32', local_var_params['int32'])) # noqa: E501 + if 'int64' in local_var_params: + form_params.append(('int64', local_var_params['int64'])) # noqa: E501 + if 'number' in local_var_params: + form_params.append(('number', local_var_params['number'])) # noqa: E501 + if 'float' in local_var_params: + form_params.append(('float', local_var_params['float'])) # noqa: E501 + if 'double' in local_var_params: + form_params.append(('double', local_var_params['double'])) # noqa: E501 + if 'string' in local_var_params: + form_params.append(('string', local_var_params['string'])) # noqa: E501 + if 'pattern_without_delimiter' in local_var_params: + form_params.append(('pattern_without_delimiter', local_var_params['pattern_without_delimiter'])) # noqa: E501 + if 'byte' in local_var_params: + form_params.append(('byte', local_var_params['byte'])) # noqa: E501 + if 'binary' in local_var_params: + local_var_files['binary'] = local_var_params['binary'] # noqa: E501 + if 'date' in local_var_params: + form_params.append(('date', local_var_params['date'])) # noqa: E501 + if 'date_time' in local_var_params: + form_params.append(('dateTime', local_var_params['date_time'])) # noqa: E501 + if 'password' in local_var_params: + form_params.append(('password', local_var_params['password'])) # noqa: E501 + if 'param_callback' in local_var_params: + form_params.append(('callback', local_var_params['param_callback'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -872,10 +880,10 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_enum_parameters(self, **kwargs): # noqa: E501 @@ -930,51 +938,52 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double', 'enum_form_string_array', 'enum_form_string'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_enum_parameters" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'enum_query_string_array' in params: - query_params.append(('enum_query_string_array', params['enum_query_string_array'])) # noqa: E501 + if 'enum_query_string_array' in local_var_params: + query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in params: - query_params.append(('enum_query_string', params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in params: - query_params.append(('enum_query_integer', params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in params: - query_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501 + if 'enum_query_string' in local_var_params: + query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 + if 'enum_query_integer' in local_var_params: + query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 + if 'enum_query_double' in local_var_params: + query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} - if 'enum_header_string_array' in params: - header_params['enum_header_string_array'] = params['enum_header_string_array'] # noqa: E501 + if 'enum_header_string_array' in local_var_params: + header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501 collection_formats['enum_header_string_array'] = 'csv' # noqa: E501 - if 'enum_header_string' in params: - header_params['enum_header_string'] = params['enum_header_string'] # noqa: E501 + if 'enum_header_string' in local_var_params: + header_params['enum_header_string'] = local_var_params['enum_header_string'] # noqa: E501 form_params = [] local_var_files = {} - if 'enum_form_string_array' in params: - form_params.append(('enum_form_string_array', params['enum_form_string_array'])) # noqa: E501 + if 'enum_form_string_array' in local_var_params: + form_params.append(('enum_form_string_array', local_var_params['enum_form_string_array'])) # noqa: E501 collection_formats['enum_form_string_array'] = 'csv' # noqa: E501 - if 'enum_form_string' in params: - form_params.append(('enum_form_string', params['enum_form_string'])) # noqa: E501 + if 'enum_form_string' in local_var_params: + form_params.append(('enum_form_string', local_var_params['enum_form_string'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -994,10 +1003,10 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501 @@ -1036,24 +1045,25 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg returns the request thread. """ + local_var_params = locals() + all_params = ['request_body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_inline_additional_properties" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): + if ('request_body' not in local_var_params or + local_var_params['request_body'] is None): raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1068,8 +1078,8 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'request_body' in local_var_params: + body_params = local_var_params['request_body'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -1087,10 +1097,10 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_json_form_data(self, param, param2, **kwargs): # noqa: E501 @@ -1131,28 +1141,29 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['param', 'param2'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_json_form_data" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in params or - params['param'] is None): + if ('param' not in local_var_params or + local_var_params['param'] is None): raise ValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in params or - params['param2'] is None): + if ('param2' not in local_var_params or + local_var_params['param2'] is None): raise ValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1165,10 +1176,10 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: form_params = [] local_var_files = {} - if 'param' in params: - form_params.append(('param', params['param'])) # noqa: E501 - if 'param2' in params: - form_params.append(('param2', params['param2'])) # noqa: E501 + if 'param' in local_var_params: + form_params.append(('param', local_var_params['param'])) # noqa: E501 + if 'param2' in local_var_params: + form_params.append(('param2', local_var_params['param2'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -1188,8 +1199,8 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py index 1f4d95a148ab..30badbd60021 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py @@ -70,24 +70,25 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_classname" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -125,8 +126,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 9eb0aa2eac61..cccf4ed7b5ed 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -68,24 +68,25 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in params or - params['pet'] is None): + if ('pet' not in local_var_params or + local_var_params['pet'] is None): raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -100,8 +101,8 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'pet' in params: - body_params = params['pet'] + if 'pet' in local_var_params: + body_params = local_var_params['pet'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 @@ -119,10 +120,10 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_pet(self, pet_id, **kwargs): # noqa: E501 @@ -163,37 +164,38 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'api_key'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] header_params = {} - if 'api_key' in params: - header_params['api_key'] = params['api_key'] # noqa: E501 + if 'api_key' in local_var_params: + header_params['api_key'] = local_var_params['api_key'] # noqa: E501 form_params = [] local_var_files = {} @@ -212,10 +214,10 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def find_pets_by_status(self, status, **kwargs): # noqa: E501 @@ -256,24 +258,25 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['status'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_pets_by_status" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in params or - params['status'] is None): + if ('status' not in local_var_params or + local_var_params['status'] is None): raise ValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -281,8 +284,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in params: - query_params.append(('status', params['status'])) # noqa: E501 + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 header_params = {} @@ -308,10 +311,10 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def find_pets_by_tags(self, tags, **kwargs): # noqa: E501 @@ -352,24 +355,25 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['tags'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_pets_by_tags" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in params or - params['tags'] is None): + if ('tags' not in local_var_params or + local_var_params['tags'] is None): raise ValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -377,8 +381,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in params: - query_params.append(('tags', params['tags'])) # noqa: E501 + if 'tags' in local_var_params: + query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 header_params = {} @@ -404,10 +408,10 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 @@ -448,31 +452,32 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_pet_by_id" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -499,10 +504,10 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Pet', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_pet(self, pet, **kwargs): # noqa: E501 @@ -541,24 +546,25 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in params or - params['pet'] is None): + if ('pet' not in local_var_params or + local_var_params['pet'] is None): raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -573,8 +579,8 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'pet' in params: - body_params = params['pet'] + if 'pet' in local_var_params: + body_params = local_var_params['pet'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 @@ -592,10 +598,10 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 @@ -638,31 +644,32 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'name', 'status'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_pet_with_form" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -670,10 +677,10 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 form_params = [] local_var_files = {} - if 'name' in params: - form_params.append(('name', params['name'])) # noqa: E501 - if 'status' in params: - form_params.append(('status', params['status'])) # noqa: E501 + if 'name' in local_var_params: + form_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'status' in local_var_params: + form_params.append(('status', local_var_params['status'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -693,10 +700,10 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def upload_file(self, pet_id, **kwargs): # noqa: E501 @@ -739,31 +746,32 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'additional_metadata', 'file'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method upload_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -771,10 +779,10 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 form_params = [] local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 + if 'additional_metadata' in local_var_params: + form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501 + if 'file' in local_var_params: + local_var_files['file'] = local_var_params['file'] # noqa: E501 body_params = None # HTTP header `Accept` @@ -798,10 +806,10 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 @@ -844,35 +852,36 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method upload_file_with_required_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'file' is set - if ('file' not in params or - params['file'] is None): + if ('file' not in local_var_params or + local_var_params['file'] is None): raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -880,10 +889,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): form_params = [] local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 + if 'additional_metadata' in local_var_params: + form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501 + if 'file' in local_var_params: + local_var_files['file'] = local_var_params['file'] # noqa: E501 body_params = None # HTTP header `Accept` @@ -907,8 +916,8 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py index 235a7b49a359..e2cfb00ab790 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py @@ -70,31 +70,32 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_order" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in params or - params['order_id'] is None): + if ('order_id' not in local_var_params or + local_var_params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} path_params = {} - if 'order_id' in params: - path_params['order_id'] = params['order_id'] # noqa: E501 + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] @@ -117,10 +118,10 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_inventory(self, **kwargs): # noqa: E501 @@ -159,21 +160,22 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_inventory" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -204,10 +206,10 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='dict(str, int)', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_order_by_id(self, order_id, **kwargs): # noqa: E501 @@ -248,35 +250,36 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_order_by_id" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in params or - params['order_id'] is None): + if ('order_id' not in local_var_params or + local_var_params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in params and params['order_id'] > 5: # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in params and params['order_id'] < 1: # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} - if 'order_id' in params: - path_params['order_id'] = params['order_id'] # noqa: E501 + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] @@ -303,10 +306,10 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def place_order(self, order, **kwargs): # noqa: E501 @@ -345,24 +348,25 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method place_order" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order' is set - if ('order' not in params or - params['order'] is None): + if ('order' not in local_var_params or + local_var_params['order'] is None): raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501 collection_formats = {} @@ -377,8 +381,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'order' in params: - body_params = params['order'] + if 'order' in local_var_params: + body_params = local_var_params['order'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/xml', 'application/json']) # noqa: E501 @@ -396,8 +400,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py index 1b016f2999c6..fc7e8bef75e5 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py @@ -70,24 +70,25 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -117,10 +118,10 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_users_with_array_input(self, user, **kwargs): # noqa: E501 @@ -159,24 +160,25 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_users_with_array_input" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -191,8 +193,8 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -206,10 +208,10 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_users_with_list_input(self, user, **kwargs): # noqa: E501 @@ -248,24 +250,25 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_users_with_list_input" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -280,8 +283,8 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -295,10 +298,10 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_user(self, username, **kwargs): # noqa: E501 @@ -339,31 +342,32 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -386,10 +390,10 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_user_by_name(self, username, **kwargs): # noqa: E501 @@ -428,31 +432,32 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user_by_name" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -479,10 +484,10 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type='User', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def login_user(self, username, password, **kwargs): # noqa: E501 @@ -523,28 +528,29 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username', 'password'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method login_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in params or - params['password'] is None): + if ('password' not in local_var_params or + local_var_params['password'] is None): raise ValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -552,10 +558,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in params: - query_params.append(('username', params['username'])) # noqa: E501 - if 'password' in params: - query_params.append(('password', params['password'])) # noqa: E501 + if 'username' in local_var_params: + query_params.append(('username', local_var_params['username'])) # noqa: E501 + if 'password' in local_var_params: + query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -580,10 +586,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def logout_user(self, **kwargs): # noqa: E501 @@ -620,21 +626,22 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method logout_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -661,10 +668,10 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_user(self, username, user, **kwargs): # noqa: E501 @@ -707,35 +714,36 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username', 'user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -745,8 +753,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -760,8 +768,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index a0cd9f0ccb01..dde25ef08e8c 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.0 \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py index 3f1efdf68bd8..6211d6d90a22 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py @@ -70,24 +70,25 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_special_tags" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_special_tags`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -125,8 +126,8 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py index 7c83ca0d064e..ef08af751e96 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py @@ -70,21 +70,22 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_boolean_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -98,8 +99,8 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -117,10 +118,10 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='bool', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_composite_serialize(self, **kwargs): # noqa: E501 @@ -161,21 +162,22 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['outer_composite'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_composite_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -189,8 +191,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'outer_composite' in params: - body_params = params['outer_composite'] + if 'outer_composite' in local_var_params: + body_params = local_var_params['outer_composite'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -208,10 +210,10 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterComposite', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_number_serialize(self, **kwargs): # noqa: E501 @@ -252,21 +254,22 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_number_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -280,8 +283,8 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -299,10 +302,10 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='float', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_string_serialize(self, **kwargs): # noqa: E501 @@ -343,21 +346,22 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_string_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -371,8 +375,8 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -390,10 +394,10 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_body_with_file_schema(self, file_schema_test_class, **kwargs): # noqa: E501 @@ -434,24 +438,25 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw returns the request thread. """ + local_var_params = locals() + all_params = ['file_schema_test_class'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_body_with_file_schema" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'file_schema_test_class' is set - if ('file_schema_test_class' not in params or - params['file_schema_test_class'] is None): + if ('file_schema_test_class' not in local_var_params or + local_var_params['file_schema_test_class'] is None): raise ValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -466,8 +471,8 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw local_var_files = {} body_params = None - if 'file_schema_test_class' in params: - body_params = params['file_schema_test_class'] + if 'file_schema_test_class' in local_var_params: + body_params = local_var_params['file_schema_test_class'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -485,10 +490,10 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_body_with_query_params(self, query, user, **kwargs): # noqa: E501 @@ -529,28 +534,29 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # returns the request thread. """ + local_var_params = locals() + all_params = ['query', 'user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_body_with_query_params" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): + if ('query' not in local_var_params or + local_var_params['query'] is None): raise ValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -558,8 +564,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # path_params = {} query_params = [] - if 'query' in params: - query_params.append(('query', params['query'])) # noqa: E501 + if 'query' in local_var_params: + query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -567,8 +573,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -586,10 +592,10 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_client_model(self, client, **kwargs): # noqa: E501 @@ -630,24 +636,25 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_client_model" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -662,8 +669,8 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -685,10 +692,10 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 @@ -755,65 +762,66 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou returns the request thread. """ + local_var_params = locals() + all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password', 'param_callback'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_endpoint_parameters" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in params or - params['number'] is None): + if ('number' not in local_var_params or + local_var_params['number'] is None): raise ValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in params or - params['double'] is None): + if ('double' not in local_var_params or + local_var_params['double'] is None): raise ValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in params or - params['pattern_without_delimiter'] is None): + if ('pattern_without_delimiter' not in local_var_params or + local_var_params['pattern_without_delimiter'] is None): raise ValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in params or - params['byte'] is None): + if ('byte' not in local_var_params or + local_var_params['byte'] is None): raise ValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in params and params['number'] > 543.2: # noqa: E501 + if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in params and params['number'] < 32.1: # noqa: E501 + if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in params and params['double'] > 123.4: # noqa: E501 + if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 - if 'double' in params and params['double'] < 67.8: # noqa: E501 + if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in params and not re.search('^[A-Z].*', params['pattern_without_delimiter']): # noqa: E501 + if 'pattern_without_delimiter' in local_var_params and not re.search('^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 - if 'integer' in params and params['integer'] > 100: # noqa: E501 + if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in params and params['integer'] < 10: # noqa: E501 + if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in params and params['int32'] > 200: # noqa: E501 + if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in params and params['int32'] < 20: # noqa: E501 + if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in params and params['float'] > 987.6: # noqa: E501 + if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501 + if 'string' in local_var_params and not re.search('[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 - if ('password' in params and - len(params['password']) > 64): + if ('password' in local_var_params and + len(local_var_params['password']) > 64): raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in params and - len(params['password']) < 10): + if ('password' in local_var_params and + len(local_var_params['password']) < 10): raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -825,34 +833,34 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou form_params = [] local_var_files = {} - if 'integer' in params: - form_params.append(('integer', params['integer'])) # noqa: E501 - if 'int32' in params: - form_params.append(('int32', params['int32'])) # noqa: E501 - if 'int64' in params: - form_params.append(('int64', params['int64'])) # noqa: E501 - if 'number' in params: - form_params.append(('number', params['number'])) # noqa: E501 - if 'float' in params: - form_params.append(('float', params['float'])) # noqa: E501 - if 'double' in params: - form_params.append(('double', params['double'])) # noqa: E501 - if 'string' in params: - form_params.append(('string', params['string'])) # noqa: E501 - if 'pattern_without_delimiter' in params: - form_params.append(('pattern_without_delimiter', params['pattern_without_delimiter'])) # noqa: E501 - if 'byte' in params: - form_params.append(('byte', params['byte'])) # noqa: E501 - if 'binary' in params: - local_var_files['binary'] = params['binary'] # noqa: E501 - if 'date' in params: - form_params.append(('date', params['date'])) # noqa: E501 - if 'date_time' in params: - form_params.append(('dateTime', params['date_time'])) # noqa: E501 - if 'password' in params: - form_params.append(('password', params['password'])) # noqa: E501 - if 'param_callback' in params: - form_params.append(('callback', params['param_callback'])) # noqa: E501 + if 'integer' in local_var_params: + form_params.append(('integer', local_var_params['integer'])) # noqa: E501 + if 'int32' in local_var_params: + form_params.append(('int32', local_var_params['int32'])) # noqa: E501 + if 'int64' in local_var_params: + form_params.append(('int64', local_var_params['int64'])) # noqa: E501 + if 'number' in local_var_params: + form_params.append(('number', local_var_params['number'])) # noqa: E501 + if 'float' in local_var_params: + form_params.append(('float', local_var_params['float'])) # noqa: E501 + if 'double' in local_var_params: + form_params.append(('double', local_var_params['double'])) # noqa: E501 + if 'string' in local_var_params: + form_params.append(('string', local_var_params['string'])) # noqa: E501 + if 'pattern_without_delimiter' in local_var_params: + form_params.append(('pattern_without_delimiter', local_var_params['pattern_without_delimiter'])) # noqa: E501 + if 'byte' in local_var_params: + form_params.append(('byte', local_var_params['byte'])) # noqa: E501 + if 'binary' in local_var_params: + local_var_files['binary'] = local_var_params['binary'] # noqa: E501 + if 'date' in local_var_params: + form_params.append(('date', local_var_params['date'])) # noqa: E501 + if 'date_time' in local_var_params: + form_params.append(('dateTime', local_var_params['date_time'])) # noqa: E501 + if 'password' in local_var_params: + form_params.append(('password', local_var_params['password'])) # noqa: E501 + if 'param_callback' in local_var_params: + form_params.append(('callback', local_var_params['param_callback'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -872,10 +880,10 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_enum_parameters(self, **kwargs): # noqa: E501 @@ -930,51 +938,52 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double', 'enum_form_string_array', 'enum_form_string'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_enum_parameters" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'enum_query_string_array' in params: - query_params.append(('enum_query_string_array', params['enum_query_string_array'])) # noqa: E501 + if 'enum_query_string_array' in local_var_params: + query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in params: - query_params.append(('enum_query_string', params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in params: - query_params.append(('enum_query_integer', params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in params: - query_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501 + if 'enum_query_string' in local_var_params: + query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 + if 'enum_query_integer' in local_var_params: + query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 + if 'enum_query_double' in local_var_params: + query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} - if 'enum_header_string_array' in params: - header_params['enum_header_string_array'] = params['enum_header_string_array'] # noqa: E501 + if 'enum_header_string_array' in local_var_params: + header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501 collection_formats['enum_header_string_array'] = 'csv' # noqa: E501 - if 'enum_header_string' in params: - header_params['enum_header_string'] = params['enum_header_string'] # noqa: E501 + if 'enum_header_string' in local_var_params: + header_params['enum_header_string'] = local_var_params['enum_header_string'] # noqa: E501 form_params = [] local_var_files = {} - if 'enum_form_string_array' in params: - form_params.append(('enum_form_string_array', params['enum_form_string_array'])) # noqa: E501 + if 'enum_form_string_array' in local_var_params: + form_params.append(('enum_form_string_array', local_var_params['enum_form_string_array'])) # noqa: E501 collection_formats['enum_form_string_array'] = 'csv' # noqa: E501 - if 'enum_form_string' in params: - form_params.append(('enum_form_string', params['enum_form_string'])) # noqa: E501 + if 'enum_form_string' in local_var_params: + form_params.append(('enum_form_string', local_var_params['enum_form_string'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -994,10 +1003,10 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501 @@ -1036,24 +1045,25 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg returns the request thread. """ + local_var_params = locals() + all_params = ['request_body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_inline_additional_properties" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): + if ('request_body' not in local_var_params or + local_var_params['request_body'] is None): raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1068,8 +1078,8 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'request_body' in local_var_params: + body_params = local_var_params['request_body'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -1087,10 +1097,10 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_json_form_data(self, param, param2, **kwargs): # noqa: E501 @@ -1131,28 +1141,29 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['param', 'param2'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_json_form_data" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in params or - params['param'] is None): + if ('param' not in local_var_params or + local_var_params['param'] is None): raise ValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in params or - params['param2'] is None): + if ('param2' not in local_var_params or + local_var_params['param2'] is None): raise ValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1165,10 +1176,10 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: form_params = [] local_var_files = {} - if 'param' in params: - form_params.append(('param', params['param'])) # noqa: E501 - if 'param2' in params: - form_params.append(('param2', params['param2'])) # noqa: E501 + if 'param' in local_var_params: + form_params.append(('param', local_var_params['param'])) # noqa: E501 + if 'param2' in local_var_params: + form_params.append(('param2', local_var_params['param2'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -1188,8 +1199,8 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py index 1f4d95a148ab..30badbd60021 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py @@ -70,24 +70,25 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_classname" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -125,8 +126,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 9eb0aa2eac61..cccf4ed7b5ed 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -68,24 +68,25 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in params or - params['pet'] is None): + if ('pet' not in local_var_params or + local_var_params['pet'] is None): raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -100,8 +101,8 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'pet' in params: - body_params = params['pet'] + if 'pet' in local_var_params: + body_params = local_var_params['pet'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 @@ -119,10 +120,10 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_pet(self, pet_id, **kwargs): # noqa: E501 @@ -163,37 +164,38 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'api_key'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] header_params = {} - if 'api_key' in params: - header_params['api_key'] = params['api_key'] # noqa: E501 + if 'api_key' in local_var_params: + header_params['api_key'] = local_var_params['api_key'] # noqa: E501 form_params = [] local_var_files = {} @@ -212,10 +214,10 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def find_pets_by_status(self, status, **kwargs): # noqa: E501 @@ -256,24 +258,25 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['status'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_pets_by_status" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in params or - params['status'] is None): + if ('status' not in local_var_params or + local_var_params['status'] is None): raise ValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -281,8 +284,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in params: - query_params.append(('status', params['status'])) # noqa: E501 + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 header_params = {} @@ -308,10 +311,10 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def find_pets_by_tags(self, tags, **kwargs): # noqa: E501 @@ -352,24 +355,25 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['tags'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_pets_by_tags" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in params or - params['tags'] is None): + if ('tags' not in local_var_params or + local_var_params['tags'] is None): raise ValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -377,8 +381,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in params: - query_params.append(('tags', params['tags'])) # noqa: E501 + if 'tags' in local_var_params: + query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 header_params = {} @@ -404,10 +408,10 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 @@ -448,31 +452,32 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_pet_by_id" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -499,10 +504,10 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Pet', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_pet(self, pet, **kwargs): # noqa: E501 @@ -541,24 +546,25 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in params or - params['pet'] is None): + if ('pet' not in local_var_params or + local_var_params['pet'] is None): raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -573,8 +579,8 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'pet' in params: - body_params = params['pet'] + if 'pet' in local_var_params: + body_params = local_var_params['pet'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 @@ -592,10 +598,10 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 @@ -638,31 +644,32 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'name', 'status'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_pet_with_form" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -670,10 +677,10 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 form_params = [] local_var_files = {} - if 'name' in params: - form_params.append(('name', params['name'])) # noqa: E501 - if 'status' in params: - form_params.append(('status', params['status'])) # noqa: E501 + if 'name' in local_var_params: + form_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'status' in local_var_params: + form_params.append(('status', local_var_params['status'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -693,10 +700,10 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def upload_file(self, pet_id, **kwargs): # noqa: E501 @@ -739,31 +746,32 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'additional_metadata', 'file'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method upload_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -771,10 +779,10 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 form_params = [] local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 + if 'additional_metadata' in local_var_params: + form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501 + if 'file' in local_var_params: + local_var_files['file'] = local_var_params['file'] # noqa: E501 body_params = None # HTTP header `Accept` @@ -798,10 +806,10 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 @@ -844,35 +852,36 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method upload_file_with_required_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'file' is set - if ('file' not in params or - params['file'] is None): + if ('file' not in local_var_params or + local_var_params['file'] is None): raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -880,10 +889,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): form_params = [] local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 + if 'additional_metadata' in local_var_params: + form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501 + if 'file' in local_var_params: + local_var_files['file'] = local_var_params['file'] # noqa: E501 body_params = None # HTTP header `Accept` @@ -907,8 +916,8 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py index 235a7b49a359..e2cfb00ab790 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py @@ -70,31 +70,32 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_order" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in params or - params['order_id'] is None): + if ('order_id' not in local_var_params or + local_var_params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} path_params = {} - if 'order_id' in params: - path_params['order_id'] = params['order_id'] # noqa: E501 + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] @@ -117,10 +118,10 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_inventory(self, **kwargs): # noqa: E501 @@ -159,21 +160,22 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_inventory" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -204,10 +206,10 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='dict(str, int)', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_order_by_id(self, order_id, **kwargs): # noqa: E501 @@ -248,35 +250,36 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_order_by_id" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in params or - params['order_id'] is None): + if ('order_id' not in local_var_params or + local_var_params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in params and params['order_id'] > 5: # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in params and params['order_id'] < 1: # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} - if 'order_id' in params: - path_params['order_id'] = params['order_id'] # noqa: E501 + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] @@ -303,10 +306,10 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def place_order(self, order, **kwargs): # noqa: E501 @@ -345,24 +348,25 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method place_order" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order' is set - if ('order' not in params or - params['order'] is None): + if ('order' not in local_var_params or + local_var_params['order'] is None): raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501 collection_formats = {} @@ -377,8 +381,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'order' in params: - body_params = params['order'] + if 'order' in local_var_params: + body_params = local_var_params['order'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/xml', 'application/json']) # noqa: E501 @@ -396,8 +400,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py index 1b016f2999c6..fc7e8bef75e5 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py @@ -70,24 +70,25 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -117,10 +118,10 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_users_with_array_input(self, user, **kwargs): # noqa: E501 @@ -159,24 +160,25 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_users_with_array_input" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -191,8 +193,8 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -206,10 +208,10 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_users_with_list_input(self, user, **kwargs): # noqa: E501 @@ -248,24 +250,25 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_users_with_list_input" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -280,8 +283,8 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -295,10 +298,10 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_user(self, username, **kwargs): # noqa: E501 @@ -339,31 +342,32 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -386,10 +390,10 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_user_by_name(self, username, **kwargs): # noqa: E501 @@ -428,31 +432,32 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user_by_name" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -479,10 +484,10 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type='User', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def login_user(self, username, password, **kwargs): # noqa: E501 @@ -523,28 +528,29 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username', 'password'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method login_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in params or - params['password'] is None): + if ('password' not in local_var_params or + local_var_params['password'] is None): raise ValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -552,10 +558,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in params: - query_params.append(('username', params['username'])) # noqa: E501 - if 'password' in params: - query_params.append(('password', params['password'])) # noqa: E501 + if 'username' in local_var_params: + query_params.append(('username', local_var_params['username'])) # noqa: E501 + if 'password' in local_var_params: + query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -580,10 +586,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def logout_user(self, **kwargs): # noqa: E501 @@ -620,21 +626,22 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method logout_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -661,10 +668,10 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_user(self, username, user, **kwargs): # noqa: E501 @@ -707,35 +714,36 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username', 'user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -745,8 +753,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -760,8 +768,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index a0cd9f0ccb01..dde25ef08e8c 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.0 \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/client/petstore/python/petstore_api/api/another_fake_api.py index 3f1efdf68bd8..6211d6d90a22 100644 --- a/samples/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/another_fake_api.py @@ -70,24 +70,25 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_special_tags" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_special_tags`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -125,8 +126,8 @@ def test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 7c83ca0d064e..ef08af751e96 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -70,21 +70,22 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_boolean_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -98,8 +99,8 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -117,10 +118,10 @@ def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='bool', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_composite_serialize(self, **kwargs): # noqa: E501 @@ -161,21 +162,22 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['outer_composite'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_composite_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -189,8 +191,8 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'outer_composite' in params: - body_params = params['outer_composite'] + if 'outer_composite' in local_var_params: + body_params = local_var_params['outer_composite'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -208,10 +210,10 @@ def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OuterComposite', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_number_serialize(self, **kwargs): # noqa: E501 @@ -252,21 +254,22 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_number_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -280,8 +283,8 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -299,10 +302,10 @@ def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='float', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def fake_outer_string_serialize(self, **kwargs): # noqa: E501 @@ -343,21 +346,22 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fake_outer_string_serialize" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -371,8 +375,8 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -390,10 +394,10 @@ def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_body_with_file_schema(self, file_schema_test_class, **kwargs): # noqa: E501 @@ -434,24 +438,25 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw returns the request thread. """ + local_var_params = locals() + all_params = ['file_schema_test_class'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_body_with_file_schema" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'file_schema_test_class' is set - if ('file_schema_test_class' not in params or - params['file_schema_test_class'] is None): + if ('file_schema_test_class' not in local_var_params or + local_var_params['file_schema_test_class'] is None): raise ValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -466,8 +471,8 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw local_var_files = {} body_params = None - if 'file_schema_test_class' in params: - body_params = params['file_schema_test_class'] + if 'file_schema_test_class' in local_var_params: + body_params = local_var_params['file_schema_test_class'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -485,10 +490,10 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_body_with_query_params(self, query, user, **kwargs): # noqa: E501 @@ -529,28 +534,29 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # returns the request thread. """ + local_var_params = locals() + all_params = ['query', 'user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_body_with_query_params" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): + if ('query' not in local_var_params or + local_var_params['query'] is None): raise ValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -558,8 +564,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # path_params = {} query_params = [] - if 'query' in params: - query_params.append(('query', params['query'])) # noqa: E501 + if 'query' in local_var_params: + query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -567,8 +573,8 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -586,10 +592,10 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_client_model(self, client, **kwargs): # noqa: E501 @@ -630,24 +636,25 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_client_model" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -662,8 +669,8 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -685,10 +692,10 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 @@ -755,65 +762,66 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou returns the request thread. """ + local_var_params = locals() + all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', 'float', 'string', 'binary', 'date', 'date_time', 'password', 'param_callback'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_endpoint_parameters" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in params or - params['number'] is None): + if ('number' not in local_var_params or + local_var_params['number'] is None): raise ValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in params or - params['double'] is None): + if ('double' not in local_var_params or + local_var_params['double'] is None): raise ValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in params or - params['pattern_without_delimiter'] is None): + if ('pattern_without_delimiter' not in local_var_params or + local_var_params['pattern_without_delimiter'] is None): raise ValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in params or - params['byte'] is None): + if ('byte' not in local_var_params or + local_var_params['byte'] is None): raise ValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in params and params['number'] > 543.2: # noqa: E501 + if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in params and params['number'] < 32.1: # noqa: E501 + if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in params and params['double'] > 123.4: # noqa: E501 + if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 - if 'double' in params and params['double'] < 67.8: # noqa: E501 + if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in params and not re.search('^[A-Z].*', params['pattern_without_delimiter']): # noqa: E501 + if 'pattern_without_delimiter' in local_var_params and not re.search('^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 - if 'integer' in params and params['integer'] > 100: # noqa: E501 + if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in params and params['integer'] < 10: # noqa: E501 + if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in params and params['int32'] > 200: # noqa: E501 + if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in params and params['int32'] < 20: # noqa: E501 + if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in params and params['float'] > 987.6: # noqa: E501 + if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in params and not re.search('[a-z]', params['string'], flags=re.IGNORECASE): # noqa: E501 + if 'string' in local_var_params and not re.search('[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 - if ('password' in params and - len(params['password']) > 64): + if ('password' in local_var_params and + len(local_var_params['password']) > 64): raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in params and - len(params['password']) < 10): + if ('password' in local_var_params and + len(local_var_params['password']) < 10): raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -825,34 +833,34 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou form_params = [] local_var_files = {} - if 'integer' in params: - form_params.append(('integer', params['integer'])) # noqa: E501 - if 'int32' in params: - form_params.append(('int32', params['int32'])) # noqa: E501 - if 'int64' in params: - form_params.append(('int64', params['int64'])) # noqa: E501 - if 'number' in params: - form_params.append(('number', params['number'])) # noqa: E501 - if 'float' in params: - form_params.append(('float', params['float'])) # noqa: E501 - if 'double' in params: - form_params.append(('double', params['double'])) # noqa: E501 - if 'string' in params: - form_params.append(('string', params['string'])) # noqa: E501 - if 'pattern_without_delimiter' in params: - form_params.append(('pattern_without_delimiter', params['pattern_without_delimiter'])) # noqa: E501 - if 'byte' in params: - form_params.append(('byte', params['byte'])) # noqa: E501 - if 'binary' in params: - local_var_files['binary'] = params['binary'] # noqa: E501 - if 'date' in params: - form_params.append(('date', params['date'])) # noqa: E501 - if 'date_time' in params: - form_params.append(('dateTime', params['date_time'])) # noqa: E501 - if 'password' in params: - form_params.append(('password', params['password'])) # noqa: E501 - if 'param_callback' in params: - form_params.append(('callback', params['param_callback'])) # noqa: E501 + if 'integer' in local_var_params: + form_params.append(('integer', local_var_params['integer'])) # noqa: E501 + if 'int32' in local_var_params: + form_params.append(('int32', local_var_params['int32'])) # noqa: E501 + if 'int64' in local_var_params: + form_params.append(('int64', local_var_params['int64'])) # noqa: E501 + if 'number' in local_var_params: + form_params.append(('number', local_var_params['number'])) # noqa: E501 + if 'float' in local_var_params: + form_params.append(('float', local_var_params['float'])) # noqa: E501 + if 'double' in local_var_params: + form_params.append(('double', local_var_params['double'])) # noqa: E501 + if 'string' in local_var_params: + form_params.append(('string', local_var_params['string'])) # noqa: E501 + if 'pattern_without_delimiter' in local_var_params: + form_params.append(('pattern_without_delimiter', local_var_params['pattern_without_delimiter'])) # noqa: E501 + if 'byte' in local_var_params: + form_params.append(('byte', local_var_params['byte'])) # noqa: E501 + if 'binary' in local_var_params: + local_var_files['binary'] = local_var_params['binary'] # noqa: E501 + if 'date' in local_var_params: + form_params.append(('date', local_var_params['date'])) # noqa: E501 + if 'date_time' in local_var_params: + form_params.append(('dateTime', local_var_params['date_time'])) # noqa: E501 + if 'password' in local_var_params: + form_params.append(('password', local_var_params['password'])) # noqa: E501 + if 'param_callback' in local_var_params: + form_params.append(('callback', local_var_params['param_callback'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -872,10 +880,10 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_enum_parameters(self, **kwargs): # noqa: E501 @@ -930,51 +938,52 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double', 'enum_form_string_array', 'enum_form_string'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_enum_parameters" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'enum_query_string_array' in params: - query_params.append(('enum_query_string_array', params['enum_query_string_array'])) # noqa: E501 + if 'enum_query_string_array' in local_var_params: + query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in params: - query_params.append(('enum_query_string', params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in params: - query_params.append(('enum_query_integer', params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in params: - query_params.append(('enum_query_double', params['enum_query_double'])) # noqa: E501 + if 'enum_query_string' in local_var_params: + query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 + if 'enum_query_integer' in local_var_params: + query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 + if 'enum_query_double' in local_var_params: + query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} - if 'enum_header_string_array' in params: - header_params['enum_header_string_array'] = params['enum_header_string_array'] # noqa: E501 + if 'enum_header_string_array' in local_var_params: + header_params['enum_header_string_array'] = local_var_params['enum_header_string_array'] # noqa: E501 collection_formats['enum_header_string_array'] = 'csv' # noqa: E501 - if 'enum_header_string' in params: - header_params['enum_header_string'] = params['enum_header_string'] # noqa: E501 + if 'enum_header_string' in local_var_params: + header_params['enum_header_string'] = local_var_params['enum_header_string'] # noqa: E501 form_params = [] local_var_files = {} - if 'enum_form_string_array' in params: - form_params.append(('enum_form_string_array', params['enum_form_string_array'])) # noqa: E501 + if 'enum_form_string_array' in local_var_params: + form_params.append(('enum_form_string_array', local_var_params['enum_form_string_array'])) # noqa: E501 collection_formats['enum_form_string_array'] = 'csv' # noqa: E501 - if 'enum_form_string' in params: - form_params.append(('enum_form_string', params['enum_form_string'])) # noqa: E501 + if 'enum_form_string' in local_var_params: + form_params.append(('enum_form_string', local_var_params['enum_form_string'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -994,10 +1003,10 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501 @@ -1036,24 +1045,25 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg returns the request thread. """ + local_var_params = locals() + all_params = ['request_body'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_inline_additional_properties" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): + if ('request_body' not in local_var_params or + local_var_params['request_body'] is None): raise ValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1068,8 +1078,8 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'request_body' in local_var_params: + body_params = local_var_params['request_body'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -1087,10 +1097,10 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def test_json_form_data(self, param, param2, **kwargs): # noqa: E501 @@ -1131,28 +1141,29 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['param', 'param2'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_json_form_data" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in params or - params['param'] is None): + if ('param' not in local_var_params or + local_var_params['param'] is None): raise ValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in params or - params['param2'] is None): + if ('param2' not in local_var_params or + local_var_params['param2'] is None): raise ValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1165,10 +1176,10 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: form_params = [] local_var_files = {} - if 'param' in params: - form_params.append(('param', params['param'])) # noqa: E501 - if 'param2' in params: - form_params.append(('param2', params['param2'])) # noqa: E501 + if 'param' in local_var_params: + form_params.append(('param', local_var_params['param'])) # noqa: E501 + if 'param2' in local_var_params: + form_params.append(('param2', local_var_params['param2'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -1188,8 +1199,8 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 1f4d95a148ab..30badbd60021 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -70,24 +70,25 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['client'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method test_classname" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in params or - params['client'] is None): + if ('client' not in local_var_params or + local_var_params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'client' in params: - body_params = params['client'] + if 'client' in local_var_params: + body_params = local_var_params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -125,8 +126,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 files=local_var_files, response_type='Client', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 9eb0aa2eac61..cccf4ed7b5ed 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -68,24 +68,25 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in params or - params['pet'] is None): + if ('pet' not in local_var_params or + local_var_params['pet'] is None): raise ValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -100,8 +101,8 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'pet' in params: - body_params = params['pet'] + if 'pet' in local_var_params: + body_params = local_var_params['pet'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 @@ -119,10 +120,10 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_pet(self, pet_id, **kwargs): # noqa: E501 @@ -163,37 +164,38 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'api_key'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] header_params = {} - if 'api_key' in params: - header_params['api_key'] = params['api_key'] # noqa: E501 + if 'api_key' in local_var_params: + header_params['api_key'] = local_var_params['api_key'] # noqa: E501 form_params = [] local_var_files = {} @@ -212,10 +214,10 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def find_pets_by_status(self, status, **kwargs): # noqa: E501 @@ -256,24 +258,25 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['status'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_pets_by_status" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in params or - params['status'] is None): + if ('status' not in local_var_params or + local_var_params['status'] is None): raise ValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -281,8 +284,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in params: - query_params.append(('status', params['status'])) # noqa: E501 + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 header_params = {} @@ -308,10 +311,10 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def find_pets_by_tags(self, tags, **kwargs): # noqa: E501 @@ -352,24 +355,25 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['tags'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method find_pets_by_tags" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in params or - params['tags'] is None): + if ('tags' not in local_var_params or + local_var_params['tags'] is None): raise ValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -377,8 +381,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in params: - query_params.append(('tags', params['tags'])) # noqa: E501 + if 'tags' in local_var_params: + query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 header_params = {} @@ -404,10 +408,10 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Pet]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 @@ -448,31 +452,32 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_pet_by_id" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -499,10 +504,10 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Pet', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_pet(self, pet, **kwargs): # noqa: E501 @@ -541,24 +546,25 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_pet" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in params or - params['pet'] is None): + if ('pet' not in local_var_params or + local_var_params['pet'] is None): raise ValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -573,8 +579,8 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'pet' in params: - body_params = params['pet'] + if 'pet' in local_var_params: + body_params = local_var_params['pet'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/xml']) # noqa: E501 @@ -592,10 +598,10 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 @@ -638,31 +644,32 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'name', 'status'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_pet_with_form" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -670,10 +677,10 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 form_params = [] local_var_files = {} - if 'name' in params: - form_params.append(('name', params['name'])) # noqa: E501 - if 'status' in params: - form_params.append(('status', params['status'])) # noqa: E501 + if 'name' in local_var_params: + form_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'status' in local_var_params: + form_params.append(('status', local_var_params['status'])) # noqa: E501 body_params = None # HTTP header `Content-Type` @@ -693,10 +700,10 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def upload_file(self, pet_id, **kwargs): # noqa: E501 @@ -739,31 +746,32 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'additional_metadata', 'file'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method upload_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -771,10 +779,10 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 form_params = [] local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 + if 'additional_metadata' in local_var_params: + form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501 + if 'file' in local_var_params: + local_var_files['file'] = local_var_params['file'] # noqa: E501 body_params = None # HTTP header `Accept` @@ -798,10 +806,10 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 @@ -844,35 +852,36 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): returns the request thread. """ + local_var_params = locals() + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method upload_file_with_required_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): + if ('pet_id' not in local_var_params or + local_var_params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'file' is set - if ('file' not in params or - params['file'] is None): + if ('file' not in local_var_params or + local_var_params['file'] is None): raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 + if 'pet_id' in local_var_params: + path_params['petId'] = local_var_params['pet_id'] # noqa: E501 query_params = [] @@ -880,10 +889,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): form_params = [] local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 + if 'additional_metadata' in local_var_params: + form_params.append(('additionalMetadata', local_var_params['additional_metadata'])) # noqa: E501 + if 'file' in local_var_params: + local_var_files['file'] = local_var_params['file'] # noqa: E501 body_params = None # HTTP header `Accept` @@ -907,8 +916,8 @@ def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api/store_api.py b/samples/client/petstore/python/petstore_api/api/store_api.py index 235a7b49a359..e2cfb00ab790 100644 --- a/samples/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/client/petstore/python/petstore_api/api/store_api.py @@ -70,31 +70,32 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_order" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in params or - params['order_id'] is None): + if ('order_id' not in local_var_params or + local_var_params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} path_params = {} - if 'order_id' in params: - path_params['order_id'] = params['order_id'] # noqa: E501 + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] @@ -117,10 +118,10 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_inventory(self, **kwargs): # noqa: E501 @@ -159,21 +160,22 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_inventory" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -204,10 +206,10 @@ def get_inventory_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='dict(str, int)', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_order_by_id(self, order_id, **kwargs): # noqa: E501 @@ -248,35 +250,36 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order_id'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_order_by_id" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in params or - params['order_id'] is None): + if ('order_id' not in local_var_params or + local_var_params['order_id'] is None): raise ValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in params and params['order_id'] > 5: # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in params and params['order_id'] < 1: # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} - if 'order_id' in params: - path_params['order_id'] = params['order_id'] # noqa: E501 + if 'order_id' in local_var_params: + path_params['order_id'] = local_var_params['order_id'] # noqa: E501 query_params = [] @@ -303,10 +306,10 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def place_order(self, order, **kwargs): # noqa: E501 @@ -345,24 +348,25 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['order'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method place_order" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'order' is set - if ('order' not in params or - params['order'] is None): + if ('order' not in local_var_params or + local_var_params['order'] is None): raise ValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501 collection_formats = {} @@ -377,8 +381,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'order' in params: - body_params = params['order'] + if 'order' in local_var_params: + body_params = local_var_params['order'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/xml', 'application/json']) # noqa: E501 @@ -396,8 +400,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 files=local_var_files, response_type='Order', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py index 1b016f2999c6..fc7e8bef75e5 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -70,24 +70,25 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -102,8 +103,8 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -117,10 +118,10 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_users_with_array_input(self, user, **kwargs): # noqa: E501 @@ -159,24 +160,25 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_users_with_array_input" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -191,8 +193,8 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -206,10 +208,10 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_users_with_list_input(self, user, **kwargs): # noqa: E501 @@ -248,24 +250,25 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_users_with_list_input" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -280,8 +283,8 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -295,10 +298,10 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_user(self, username, **kwargs): # noqa: E501 @@ -339,31 +342,32 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -386,10 +390,10 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_user_by_name(self, username, **kwargs): # noqa: E501 @@ -428,31 +432,32 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user_by_name" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -479,10 +484,10 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 files=local_var_files, response_type='User', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def login_user(self, username, password, **kwargs): # noqa: E501 @@ -523,28 +528,29 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username', 'password'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method login_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in params or - params['password'] is None): + if ('password' not in local_var_params or + local_var_params['password'] is None): raise ValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -552,10 +558,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in params: - query_params.append(('username', params['username'])) # noqa: E501 - if 'password' in params: - query_params.append(('password', params['password'])) # noqa: E501 + if 'username' in local_var_params: + query_params.append(('username', local_var_params['username'])) # noqa: E501 + if 'password' in local_var_params: + query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -580,10 +586,10 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def logout_user(self, **kwargs): # noqa: E501 @@ -620,21 +626,22 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method logout_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -661,10 +668,10 @@ def logout_user_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_user(self, username, user, **kwargs): # noqa: E501 @@ -707,35 +714,36 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['username', 'user'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): + if ('username' not in local_var_params or + local_var_params['username'] is None): raise ValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] @@ -745,8 +753,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'user' in local_var_params: + body_params = local_var_params['user'] # Authentication setting auth_settings = [] # noqa: E501 @@ -760,8 +768,8 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async=local_var_params.get('async'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 0628777500bd..dde25ef08e8c 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.0-SNAPSHOT \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index 82c3596aa35a..99dcb190b959 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 3.1.0-SNAPSHOT. +Generated by OpenAPI Generator 3.1.1-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/php-silex/.openapi-generator/VERSION b/samples/server/petstore/php-silex/.openapi-generator/VERSION index 1c00c5181548..dde25ef08e8c 100644 --- a/samples/server/petstore/php-silex/.openapi-generator/VERSION +++ b/samples/server/petstore/php-silex/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file