forked from loafle/openapi-generator-original
Updated template so that generated code now renders docstrings and function parameters nicely in IDE. (#10331)
Endpoints are still accessible in generated code, mainly to satisfy some test cases.
This commit is contained in:
parent
d8d5709b8b
commit
ae88cf14da
@ -18,7 +18,6 @@ from {{packageName}}.model_utils import ( # noqa: F401
|
|||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
|
||||||
|
|
||||||
{{#operations}}
|
|
||||||
class {{classname}}(object):
|
class {{classname}}(object):
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||||
Ref: https://openapi-generator.tech
|
Ref: https://openapi-generator.tech
|
||||||
@ -30,102 +29,9 @@ class {{classname}}(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
{{#operations}}
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
|
self.{{operationId}}_endpoint = _Endpoint(
|
||||||
def __{{operationId}}(
|
|
||||||
self,
|
|
||||||
{{#requiredParams}}
|
|
||||||
{{^defaultValue}}
|
|
||||||
{{paramName}},
|
|
||||||
{{/defaultValue}}
|
|
||||||
{{/requiredParams}}
|
|
||||||
{{#requiredParams}}
|
|
||||||
{{#defaultValue}}
|
|
||||||
{{paramName}}={{{defaultValue}}},
|
|
||||||
{{/defaultValue}}
|
|
||||||
{{/requiredParams}}
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
|
|
||||||
|
|
||||||
{{#notes}}
|
|
||||||
{{{.}}} # noqa: E501
|
|
||||||
{{/notes}}
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.{{operationId}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#requiredParams}}{{#defaultValue}}{{paramName}}={{{defaultValue}}}, {{/defaultValue}}{{/requiredParams}}async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
{{#requiredParams}}
|
|
||||||
{{#-last}}
|
|
||||||
Args:
|
|
||||||
{{/-last}}
|
|
||||||
{{/requiredParams}}
|
|
||||||
{{#requiredParams}}
|
|
||||||
{{^defaultValue}}
|
|
||||||
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}{{/description}}
|
|
||||||
{{/defaultValue}}
|
|
||||||
{{/requiredParams}}
|
|
||||||
{{#requiredParams}}
|
|
||||||
{{#defaultValue}}
|
|
||||||
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}]
|
|
||||||
{{/defaultValue}}
|
|
||||||
{{/requiredParams}}
|
|
||||||
|
|
||||||
Keyword Args:{{#optionalParams}}
|
|
||||||
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}}{{/optionalParams}}
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
||||||
one number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
{{returnType}}{{^returnType}}None{{/returnType}}
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
{{#requiredParams}}
|
|
||||||
kwargs['{{paramName}}'] = \
|
|
||||||
{{paramName}}
|
|
||||||
{{/requiredParams}}
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.{{operationId}} = _Endpoint(
|
|
||||||
settings={
|
settings={
|
||||||
'response_type': {{#returnType}}({{{.}}},){{/returnType}}{{^returnType}}None{{/returnType}},
|
'response_type': {{#returnType}}({{{.}}},){{/returnType}}{{^returnType}}None{{/returnType}},
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
@ -299,8 +205,105 @@ class {{classname}}(object):
|
|||||||
'content_type': [],
|
'content_type': [],
|
||||||
{{/hasConsumes}}
|
{{/hasConsumes}}
|
||||||
},
|
},
|
||||||
api_client=api_client,
|
api_client=api_client
|
||||||
callable=__{{operationId}}
|
|
||||||
)
|
)
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
{{/operations}}
|
{{/operations}}
|
||||||
|
|
||||||
|
{{#operations}}
|
||||||
|
{{#operation}}
|
||||||
|
def {{operationId}}(
|
||||||
|
self,
|
||||||
|
{{#requiredParams}}
|
||||||
|
{{^defaultValue}}
|
||||||
|
{{paramName}},
|
||||||
|
{{/defaultValue}}
|
||||||
|
{{/requiredParams}}
|
||||||
|
{{#requiredParams}}
|
||||||
|
{{#defaultValue}}
|
||||||
|
{{paramName}}={{{defaultValue}}},
|
||||||
|
{{/defaultValue}}
|
||||||
|
{{/requiredParams}}
|
||||||
|
**kwargs
|
||||||
|
):
|
||||||
|
"""{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
|
||||||
|
|
||||||
|
{{#notes}}
|
||||||
|
{{{.}}} # noqa: E501
|
||||||
|
{{/notes}}
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.{{operationId}}({{#requiredParams}}{{^defaultValue}}{{paramName}}, {{/defaultValue}}{{/requiredParams}}{{#requiredParams}}{{#defaultValue}}{{paramName}}={{{defaultValue}}}, {{/defaultValue}}{{/requiredParams}}async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
{{#requiredParams}}
|
||||||
|
{{#-last}}
|
||||||
|
Args:
|
||||||
|
{{/-last}}
|
||||||
|
{{/requiredParams}}
|
||||||
|
{{#requiredParams}}
|
||||||
|
{{^defaultValue}}
|
||||||
|
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}{{/description}}
|
||||||
|
{{/defaultValue}}
|
||||||
|
{{/requiredParams}}
|
||||||
|
{{#requiredParams}}
|
||||||
|
{{#defaultValue}}
|
||||||
|
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}]
|
||||||
|
{{/defaultValue}}
|
||||||
|
{{/requiredParams}}
|
||||||
|
|
||||||
|
Keyword Args:{{#optionalParams}}
|
||||||
|
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}}{{/optionalParams}}
|
||||||
|
_return_http_data_only (bool): response data without head status
|
||||||
|
code and headers. Default is True.
|
||||||
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||||
|
will be returned without reading/decoding response data.
|
||||||
|
Default is True.
|
||||||
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
||||||
|
one number provided, it will be total request timeout. It can also
|
||||||
|
be a pair (tuple) of (connection, read) timeouts.
|
||||||
|
Default is None.
|
||||||
|
_check_input_type (bool): specifies if type checking
|
||||||
|
should be done one the data sent to the server.
|
||||||
|
Default is True.
|
||||||
|
_check_return_type (bool): specifies if type checking
|
||||||
|
should be done one the data received from the server.
|
||||||
|
Default is True.
|
||||||
|
_host_index (int/None): specifies the index of the server
|
||||||
|
that we want to use.
|
||||||
|
Default is read from the configuration.
|
||||||
|
async_req (bool): execute request asynchronously
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
{{returnType}}{{^returnType}}None{{/returnType}}
|
||||||
|
If the method is called asynchronously, returns the request
|
||||||
|
thread.
|
||||||
|
"""
|
||||||
|
kwargs['async_req'] = kwargs.get(
|
||||||
|
'async_req', False
|
||||||
|
)
|
||||||
|
kwargs['_return_http_data_only'] = kwargs.get(
|
||||||
|
'_return_http_data_only', True
|
||||||
|
)
|
||||||
|
kwargs['_preload_content'] = kwargs.get(
|
||||||
|
'_preload_content', True
|
||||||
|
)
|
||||||
|
kwargs['_request_timeout'] = kwargs.get(
|
||||||
|
'_request_timeout', None
|
||||||
|
)
|
||||||
|
kwargs['_check_input_type'] = kwargs.get(
|
||||||
|
'_check_input_type', True
|
||||||
|
)
|
||||||
|
kwargs['_check_return_type'] = kwargs.get(
|
||||||
|
'_check_return_type', True
|
||||||
|
)
|
||||||
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
|
{{#requiredParams}}
|
||||||
|
kwargs['{{paramName}}'] = \
|
||||||
|
{{paramName}}
|
||||||
|
{{/requiredParams}}
|
||||||
|
return self.{{operationId}}_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
|
{{/operation}}
|
||||||
|
{{/operations}}
|
||||||
|
@ -35,8 +35,58 @@ class AnotherFakeApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.call_123_test_special_tags_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Client,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/another-fake/dummy',
|
||||||
|
'operation_id': 'call_123_test_special_tags',
|
||||||
|
'http_method': 'PATCH',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(Client,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __call_123_test_special_tags(
|
def call_123_test_special_tags(
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,56 +150,5 @@ class AnotherFakeApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.call_123_test_special_tags_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.call_123_test_special_tags = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Client,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/another-fake/dummy',
|
|
||||||
'operation_id': 'call_123_test_special_tags',
|
|
||||||
'http_method': 'PATCH',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(Client,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__call_123_test_special_tags
|
|
||||||
)
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,60 @@ class FakeClassnameTags123Api(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.test_classname_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Client,),
|
||||||
|
'auth': [
|
||||||
|
'api_key_query'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/fake_classname_test',
|
||||||
|
'operation_id': 'test_classname',
|
||||||
|
'http_method': 'PATCH',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(Client,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __test_classname(
|
def test_classname(
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,58 +152,5 @@ class FakeClassnameTags123Api(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.test_classname_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.test_classname = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Client,),
|
|
||||||
'auth': [
|
|
||||||
'api_key_query'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/fake_classname_test',
|
|
||||||
'operation_id': 'test_classname',
|
|
||||||
'http_method': 'PATCH',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(Client,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__test_classname
|
|
||||||
)
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,204 @@ class StoreApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.delete_order_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order/{order_id}',
|
||||||
|
'operation_id': 'delete_order',
|
||||||
|
'http_method': 'DELETE',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'order_id':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'order_id': 'order_id',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'order_id': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_inventory_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (int,)},),
|
||||||
|
'auth': [
|
||||||
|
'api_key'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/store/inventory',
|
||||||
|
'operation_id': 'get_inventory',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_order_by_id_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Order,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order/{order_id}',
|
||||||
|
'operation_id': 'get_order_by_id',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
'order_id',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
('order_id',): {
|
||||||
|
|
||||||
def __delete_order(
|
'inclusive_maximum': 5,
|
||||||
|
'inclusive_minimum': 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'order_id':
|
||||||
|
(int,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'order_id': 'order_id',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'order_id': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.place_order_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Order,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order',
|
||||||
|
'operation_id': 'place_order',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(Order,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
|
def delete_order(
|
||||||
self,
|
self,
|
||||||
order_id,
|
order_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,58 +296,9 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['order_id'] = \
|
kwargs['order_id'] = \
|
||||||
order_id
|
order_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.delete_order_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.delete_order = _Endpoint(
|
def get_inventory(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order/{order_id}',
|
|
||||||
'operation_id': 'delete_order',
|
|
||||||
'http_method': 'DELETE',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'order_id':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'order_id': 'order_id',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'order_id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__delete_order
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_inventory(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -210,55 +357,9 @@ class StoreApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_inventory_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_inventory = _Endpoint(
|
def get_order_by_id(
|
||||||
settings={
|
|
||||||
'response_type': ({str: (int,)},),
|
|
||||||
'auth': [
|
|
||||||
'api_key'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/store/inventory',
|
|
||||||
'operation_id': 'get_inventory',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_inventory
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_order_by_id(
|
|
||||||
self,
|
self,
|
||||||
order_id,
|
order_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -322,67 +423,9 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['order_id'] = \
|
kwargs['order_id'] = \
|
||||||
order_id
|
order_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_order_by_id_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_order_by_id = _Endpoint(
|
def place_order(
|
||||||
settings={
|
|
||||||
'response_type': (Order,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order/{order_id}',
|
|
||||||
'operation_id': 'get_order_by_id',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
'order_id',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
('order_id',): {
|
|
||||||
|
|
||||||
'inclusive_maximum': 5,
|
|
||||||
'inclusive_minimum': 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'order_id':
|
|
||||||
(int,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'order_id': 'order_id',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'order_id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_order_by_id
|
|
||||||
)
|
|
||||||
|
|
||||||
def __place_order(
|
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -445,55 +488,5 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.place_order_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.place_order = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Order,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order',
|
|
||||||
'operation_id': 'place_order',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(Order,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__place_order
|
|
||||||
)
|
|
||||||
|
@ -35,8 +35,391 @@ class UserApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.create_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user',
|
||||||
|
'operation_id': 'create_user',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(User,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.create_users_with_array_input_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/createWithArray',
|
||||||
|
'operation_id': 'create_users_with_array_input',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
([User],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.create_users_with_list_input_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/createWithList',
|
||||||
|
'operation_id': 'create_users_with_list_input',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
([User],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.delete_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'delete_user',
|
||||||
|
'http_method': 'DELETE',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_user_by_name_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (User,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'get_user_by_name',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.login_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (str,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/login',
|
||||||
|
'operation_id': 'login_user',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
'password',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
'password',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
'password':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
'password': 'password',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'query',
|
||||||
|
'password': 'query',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.logout_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/logout',
|
||||||
|
'operation_id': 'logout_user',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.update_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'update_user',
|
||||||
|
'http_method': 'PUT',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
'body':
|
||||||
|
(User,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __create_user(
|
def create_user(
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,57 +483,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_user = _Endpoint(
|
def create_users_with_array_input(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user',
|
|
||||||
'operation_id': 'create_user',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(User,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __create_users_with_array_input(
|
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -213,57 +548,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_users_with_array_input_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_users_with_array_input = _Endpoint(
|
def create_users_with_list_input(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/createWithArray',
|
|
||||||
'operation_id': 'create_users_with_array_input',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
([User],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_users_with_array_input
|
|
||||||
)
|
|
||||||
|
|
||||||
def __create_users_with_list_input(
|
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -326,57 +613,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_users_with_list_input_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_users_with_list_input = _Endpoint(
|
def delete_user(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/createWithList',
|
|
||||||
'operation_id': 'create_users_with_list_input',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
([User],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_users_with_list_input
|
|
||||||
)
|
|
||||||
|
|
||||||
def __delete_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -440,58 +679,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['username'] = \
|
kwargs['username'] = \
|
||||||
username
|
username
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.delete_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.delete_user = _Endpoint(
|
def get_user_by_name(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'delete_user',
|
|
||||||
'http_method': 'DELETE',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__delete_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_user_by_name(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -554,61 +744,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['username'] = \
|
kwargs['username'] = \
|
||||||
username
|
username
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_user_by_name_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_user_by_name = _Endpoint(
|
def login_user(
|
||||||
settings={
|
|
||||||
'response_type': (User,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'get_user_by_name',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_user_by_name
|
|
||||||
)
|
|
||||||
|
|
||||||
def __login_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
@ -675,67 +813,9 @@ class UserApi(object):
|
|||||||
username
|
username
|
||||||
kwargs['password'] = \
|
kwargs['password'] = \
|
||||||
password
|
password
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.login_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.login_user = _Endpoint(
|
def logout_user(
|
||||||
settings={
|
|
||||||
'response_type': (str,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/login',
|
|
||||||
'operation_id': 'login_user',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
'password',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
'password',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
'password':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
'password': 'password',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'query',
|
|
||||||
'password': 'query',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__login_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __logout_user(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -793,51 +873,9 @@ class UserApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.logout_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.logout_user = _Endpoint(
|
def update_user(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/logout',
|
|
||||||
'operation_id': 'logout_user',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__logout_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __update_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
body,
|
body,
|
||||||
@ -905,58 +943,5 @@ class UserApi(object):
|
|||||||
username
|
username
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.update_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.update_user = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'update_user',
|
|
||||||
'http_method': 'PUT',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
'body':
|
|
||||||
(User,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__update_user
|
|
||||||
)
|
|
||||||
|
@ -38,7 +38,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
"""Test case for boolean
|
"""Test case for boolean
|
||||||
|
|
||||||
"""
|
"""
|
||||||
endpoint = self.api.boolean
|
endpoint = self.api.boolean_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (bool,)
|
assert endpoint.openapi_types['body'] == (bool,)
|
||||||
assert endpoint.settings['response_type'] == (bool,)
|
assert endpoint.settings['response_type'] == (bool,)
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
"""Test case for string
|
"""Test case for string
|
||||||
|
|
||||||
"""
|
"""
|
||||||
endpoint = self.api.string
|
endpoint = self.api.string_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (str,)
|
assert endpoint.openapi_types['body'] == (str,)
|
||||||
assert endpoint.settings['response_type'] == (str,)
|
assert endpoint.settings['response_type'] == (str,)
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import object_model_with_ref_props
|
from petstore_api.model import object_model_with_ref_props
|
||||||
endpoint = self.api.object_model_with_ref_props
|
endpoint = self.api.object_model_with_ref_props_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
assert endpoint.openapi_types['body'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
||||||
assert endpoint.settings['response_type'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
assert endpoint.settings['response_type'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import string_enum
|
from petstore_api.model import string_enum
|
||||||
endpoint = self.api.string_enum
|
endpoint = self.api.string_enum_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (string_enum.StringEnum,)
|
assert endpoint.openapi_types['body'] == (string_enum.StringEnum,)
|
||||||
assert endpoint.settings['response_type'] == (string_enum.StringEnum,)
|
assert endpoint.settings['response_type'] == (string_enum.StringEnum,)
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import animal_farm
|
from petstore_api.model import animal_farm
|
||||||
endpoint = self.api.array_model
|
endpoint = self.api.array_model_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (animal_farm.AnimalFarm,)
|
assert endpoint.openapi_types['body'] == (animal_farm.AnimalFarm,)
|
||||||
assert endpoint.settings['response_type'] == (animal_farm.AnimalFarm,)
|
assert endpoint.settings['response_type'] == (animal_farm.AnimalFarm,)
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import number_with_validations
|
from petstore_api.model import number_with_validations
|
||||||
endpoint = self.api.number_with_validations
|
endpoint = self.api.number_with_validations_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (number_with_validations.NumberWithValidations,)
|
assert endpoint.openapi_types['body'] == (number_with_validations.NumberWithValidations,)
|
||||||
assert endpoint.settings['response_type'] == (number_with_validations.NumberWithValidations,)
|
assert endpoint.settings['response_type'] == (number_with_validations.NumberWithValidations,)
|
||||||
|
|
||||||
@ -110,14 +110,14 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
# when we omit the required enums of length one, they are still set
|
# when we omit the required enums of length one, they are still set
|
||||||
endpoint = self.api.test_endpoint_enums_length_one
|
endpoint = self.api.test_endpoint_enums_length_one_endpoint
|
||||||
import six
|
import six
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
else:
|
else:
|
||||||
from mock import patch
|
from mock import patch
|
||||||
with patch.object(endpoint, 'call_with_http_info') as call_with_http_info:
|
with patch.object(endpoint, 'call_with_http_info') as call_with_http_info:
|
||||||
endpoint()
|
self.api.test_endpoint_enums_length_one()
|
||||||
call_with_http_info.assert_called_with(
|
call_with_http_info.assert_called_with(
|
||||||
_check_input_type=True,
|
_check_input_type=True,
|
||||||
_check_return_type=True,
|
_check_return_type=True,
|
||||||
@ -139,7 +139,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
"""
|
"""
|
||||||
# check that we can access the endpoint's validations
|
# check that we can access the endpoint's validations
|
||||||
endpoint = self.api.test_endpoint_parameters
|
endpoint = self.api.test_endpoint_parameters_endpoint
|
||||||
assert endpoint.validations[('number',)] == {
|
assert endpoint.validations[('number',)] == {
|
||||||
'inclusive_maximum': 543.2,
|
'inclusive_maximum': 543.2,
|
||||||
'inclusive_minimum': 32.1,
|
'inclusive_minimum': 32.1,
|
||||||
@ -160,7 +160,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
To test enum parameters # noqa: E501
|
To test enum parameters # noqa: E501
|
||||||
"""
|
"""
|
||||||
# check that we can access the endpoint's allowed_values
|
# check that we can access the endpoint's allowed_values
|
||||||
endpoint = self.api.test_enum_parameters
|
endpoint = self.api.test_enum_parameters_endpoint
|
||||||
assert endpoint.allowed_values[('enum_query_string',)] == {
|
assert endpoint.allowed_values[('enum_query_string',)] == {
|
||||||
"_ABC": "_abc",
|
"_ABC": "_abc",
|
||||||
"-EFG": "-efg",
|
"-EFG": "-efg",
|
||||||
|
@ -35,8 +35,58 @@ class AnotherFakeApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.call_123_test_special_tags_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Client,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/another-fake/dummy',
|
||||||
|
'operation_id': 'call_123_test_special_tags',
|
||||||
|
'http_method': 'PATCH',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(Client,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __call_123_test_special_tags(
|
def call_123_test_special_tags(
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,56 +150,5 @@ class AnotherFakeApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.call_123_test_special_tags_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.call_123_test_special_tags = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Client,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/another-fake/dummy',
|
|
||||||
'operation_id': 'call_123_test_special_tags',
|
|
||||||
'http_method': 'PATCH',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(Client,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__call_123_test_special_tags
|
|
||||||
)
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,60 @@ class FakeClassnameTags123Api(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.test_classname_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Client,),
|
||||||
|
'auth': [
|
||||||
|
'api_key_query'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/fake_classname_test',
|
||||||
|
'operation_id': 'test_classname',
|
||||||
|
'http_method': 'PATCH',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(Client,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __test_classname(
|
def test_classname(
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,58 +152,5 @@ class FakeClassnameTags123Api(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.test_classname_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.test_classname = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Client,),
|
|
||||||
'auth': [
|
|
||||||
'api_key_query'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/fake_classname_test',
|
|
||||||
'operation_id': 'test_classname',
|
|
||||||
'http_method': 'PATCH',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(Client,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__test_classname
|
|
||||||
)
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,204 @@ class StoreApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.delete_order_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order/{order_id}',
|
||||||
|
'operation_id': 'delete_order',
|
||||||
|
'http_method': 'DELETE',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'order_id':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'order_id': 'order_id',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'order_id': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_inventory_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (int,)},),
|
||||||
|
'auth': [
|
||||||
|
'api_key'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/store/inventory',
|
||||||
|
'operation_id': 'get_inventory',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_order_by_id_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Order,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order/{order_id}',
|
||||||
|
'operation_id': 'get_order_by_id',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
'order_id',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
('order_id',): {
|
||||||
|
|
||||||
def __delete_order(
|
'inclusive_maximum': 5,
|
||||||
|
'inclusive_minimum': 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'order_id':
|
||||||
|
(int,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'order_id': 'order_id',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'order_id': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.place_order_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Order,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order',
|
||||||
|
'operation_id': 'place_order',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(Order,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
|
def delete_order(
|
||||||
self,
|
self,
|
||||||
order_id,
|
order_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,58 +296,9 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['order_id'] = \
|
kwargs['order_id'] = \
|
||||||
order_id
|
order_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.delete_order_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.delete_order = _Endpoint(
|
def get_inventory(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order/{order_id}',
|
|
||||||
'operation_id': 'delete_order',
|
|
||||||
'http_method': 'DELETE',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'order_id':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'order_id': 'order_id',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'order_id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__delete_order
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_inventory(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -210,55 +357,9 @@ class StoreApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_inventory_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_inventory = _Endpoint(
|
def get_order_by_id(
|
||||||
settings={
|
|
||||||
'response_type': ({str: (int,)},),
|
|
||||||
'auth': [
|
|
||||||
'api_key'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/store/inventory',
|
|
||||||
'operation_id': 'get_inventory',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_inventory
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_order_by_id(
|
|
||||||
self,
|
self,
|
||||||
order_id,
|
order_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -322,67 +423,9 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['order_id'] = \
|
kwargs['order_id'] = \
|
||||||
order_id
|
order_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_order_by_id_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_order_by_id = _Endpoint(
|
def place_order(
|
||||||
settings={
|
|
||||||
'response_type': (Order,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order/{order_id}',
|
|
||||||
'operation_id': 'get_order_by_id',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
'order_id',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
('order_id',): {
|
|
||||||
|
|
||||||
'inclusive_maximum': 5,
|
|
||||||
'inclusive_minimum': 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'order_id':
|
|
||||||
(int,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'order_id': 'order_id',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'order_id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_order_by_id
|
|
||||||
)
|
|
||||||
|
|
||||||
def __place_order(
|
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -445,55 +488,5 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.place_order_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.place_order = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Order,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order',
|
|
||||||
'operation_id': 'place_order',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(Order,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__place_order
|
|
||||||
)
|
|
||||||
|
@ -35,8 +35,391 @@ class UserApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.create_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user',
|
||||||
|
'operation_id': 'create_user',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
(User,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.create_users_with_array_input_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/createWithArray',
|
||||||
|
'operation_id': 'create_users_with_array_input',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
([User],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.create_users_with_list_input_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/createWithList',
|
||||||
|
'operation_id': 'create_users_with_list_input',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'body':
|
||||||
|
([User],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.delete_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'delete_user',
|
||||||
|
'http_method': 'DELETE',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_user_by_name_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (User,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'get_user_by_name',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.login_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (str,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/login',
|
||||||
|
'operation_id': 'login_user',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
'password',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
'password',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
'password':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
'password': 'password',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'query',
|
||||||
|
'password': 'query',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.logout_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/logout',
|
||||||
|
'operation_id': 'logout_user',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.update_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'update_user',
|
||||||
|
'http_method': 'PUT',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
'body',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
'body':
|
||||||
|
(User,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
'body': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __create_user(
|
def create_user(
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,57 +483,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_user = _Endpoint(
|
def create_users_with_array_input(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user',
|
|
||||||
'operation_id': 'create_user',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
(User,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __create_users_with_array_input(
|
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -213,57 +548,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_users_with_array_input_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_users_with_array_input = _Endpoint(
|
def create_users_with_list_input(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/createWithArray',
|
|
||||||
'operation_id': 'create_users_with_array_input',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
([User],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_users_with_array_input
|
|
||||||
)
|
|
||||||
|
|
||||||
def __create_users_with_list_input(
|
|
||||||
self,
|
self,
|
||||||
body,
|
body,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -326,57 +613,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_users_with_list_input_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_users_with_list_input = _Endpoint(
|
def delete_user(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/createWithList',
|
|
||||||
'operation_id': 'create_users_with_list_input',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'body':
|
|
||||||
([User],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_users_with_list_input
|
|
||||||
)
|
|
||||||
|
|
||||||
def __delete_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -440,58 +679,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['username'] = \
|
kwargs['username'] = \
|
||||||
username
|
username
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.delete_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.delete_user = _Endpoint(
|
def get_user_by_name(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'delete_user',
|
|
||||||
'http_method': 'DELETE',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__delete_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_user_by_name(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -554,61 +744,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['username'] = \
|
kwargs['username'] = \
|
||||||
username
|
username
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_user_by_name_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_user_by_name = _Endpoint(
|
def login_user(
|
||||||
settings={
|
|
||||||
'response_type': (User,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'get_user_by_name',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_user_by_name
|
|
||||||
)
|
|
||||||
|
|
||||||
def __login_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
@ -675,67 +813,9 @@ class UserApi(object):
|
|||||||
username
|
username
|
||||||
kwargs['password'] = \
|
kwargs['password'] = \
|
||||||
password
|
password
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.login_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.login_user = _Endpoint(
|
def logout_user(
|
||||||
settings={
|
|
||||||
'response_type': (str,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/login',
|
|
||||||
'operation_id': 'login_user',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
'password',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
'password',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
'password':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
'password': 'password',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'query',
|
|
||||||
'password': 'query',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__login_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __logout_user(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -793,51 +873,9 @@ class UserApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.logout_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.logout_user = _Endpoint(
|
def update_user(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/logout',
|
|
||||||
'operation_id': 'logout_user',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__logout_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __update_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
body,
|
body,
|
||||||
@ -905,58 +943,5 @@ class UserApi(object):
|
|||||||
username
|
username
|
||||||
kwargs['body'] = \
|
kwargs['body'] = \
|
||||||
body
|
body
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.update_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.update_user = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'update_user',
|
|
||||||
'http_method': 'PUT',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
'body',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
'body':
|
|
||||||
(User,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
'body': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__update_user
|
|
||||||
)
|
|
||||||
|
@ -38,7 +38,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
"""Test case for boolean
|
"""Test case for boolean
|
||||||
|
|
||||||
"""
|
"""
|
||||||
endpoint = self.api.boolean
|
endpoint = self.api.boolean_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (bool,)
|
assert endpoint.openapi_types['body'] == (bool,)
|
||||||
assert endpoint.settings['response_type'] == (bool,)
|
assert endpoint.settings['response_type'] == (bool,)
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
"""Test case for string
|
"""Test case for string
|
||||||
|
|
||||||
"""
|
"""
|
||||||
endpoint = self.api.string
|
endpoint = self.api.string_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (str,)
|
assert endpoint.openapi_types['body'] == (str,)
|
||||||
assert endpoint.settings['response_type'] == (str,)
|
assert endpoint.settings['response_type'] == (str,)
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import object_model_with_ref_props
|
from petstore_api.model import object_model_with_ref_props
|
||||||
endpoint = self.api.object_model_with_ref_props
|
endpoint = self.api.object_model_with_ref_props_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
assert endpoint.openapi_types['body'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
||||||
assert endpoint.settings['response_type'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
assert endpoint.settings['response_type'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import string_enum
|
from petstore_api.model import string_enum
|
||||||
endpoint = self.api.string_enum
|
endpoint = self.api.string_enum_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (string_enum.StringEnum,)
|
assert endpoint.openapi_types['body'] == (string_enum.StringEnum,)
|
||||||
assert endpoint.settings['response_type'] == (string_enum.StringEnum,)
|
assert endpoint.settings['response_type'] == (string_enum.StringEnum,)
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import animal_farm
|
from petstore_api.model import animal_farm
|
||||||
endpoint = self.api.array_model
|
endpoint = self.api.array_model_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (animal_farm.AnimalFarm,)
|
assert endpoint.openapi_types['body'] == (animal_farm.AnimalFarm,)
|
||||||
assert endpoint.settings['response_type'] == (animal_farm.AnimalFarm,)
|
assert endpoint.settings['response_type'] == (animal_farm.AnimalFarm,)
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from petstore_api.model import number_with_validations
|
from petstore_api.model import number_with_validations
|
||||||
endpoint = self.api.number_with_validations
|
endpoint = self.api.number_with_validations_endpoint
|
||||||
assert endpoint.openapi_types['body'] == (number_with_validations.NumberWithValidations,)
|
assert endpoint.openapi_types['body'] == (number_with_validations.NumberWithValidations,)
|
||||||
assert endpoint.settings['response_type'] == (number_with_validations.NumberWithValidations,)
|
assert endpoint.settings['response_type'] == (number_with_validations.NumberWithValidations,)
|
||||||
|
|
||||||
@ -110,14 +110,14 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
# when we omit the required enums of length one, they are still set
|
# when we omit the required enums of length one, they are still set
|
||||||
endpoint = self.api.test_endpoint_enums_length_one
|
endpoint = self.api.test_endpoint_enums_length_one_endpoint
|
||||||
import six
|
import six
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
else:
|
else:
|
||||||
from mock import patch
|
from mock import patch
|
||||||
with patch.object(endpoint, 'call_with_http_info') as call_with_http_info:
|
with patch.object(endpoint, 'call_with_http_info') as call_with_http_info:
|
||||||
endpoint()
|
self.api.test_endpoint_enums_length_one()
|
||||||
call_with_http_info.assert_called_with(
|
call_with_http_info.assert_called_with(
|
||||||
_check_input_type=True,
|
_check_input_type=True,
|
||||||
_check_return_type=True,
|
_check_return_type=True,
|
||||||
@ -139,7 +139,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
|
||||||
"""
|
"""
|
||||||
# check that we can access the endpoint's validations
|
# check that we can access the endpoint's validations
|
||||||
endpoint = self.api.test_endpoint_parameters
|
endpoint = self.api.test_endpoint_parameters_endpoint
|
||||||
assert endpoint.validations[('number',)] == {
|
assert endpoint.validations[('number',)] == {
|
||||||
'inclusive_maximum': 543.2,
|
'inclusive_maximum': 543.2,
|
||||||
'inclusive_minimum': 32.1,
|
'inclusive_minimum': 32.1,
|
||||||
@ -160,7 +160,7 @@ class TestFakeApi(unittest.TestCase):
|
|||||||
To test enum parameters # noqa: E501
|
To test enum parameters # noqa: E501
|
||||||
"""
|
"""
|
||||||
# check that we can access the endpoint's allowed_values
|
# check that we can access the endpoint's allowed_values
|
||||||
endpoint = self.api.test_enum_parameters
|
endpoint = self.api.test_enum_parameters_endpoint
|
||||||
assert endpoint.allowed_values[('enum_query_string',)] == {
|
assert endpoint.allowed_values[('enum_query_string',)] == {
|
||||||
"_ABC": "_abc",
|
"_ABC": "_abc",
|
||||||
"-EFG": "-efg",
|
"-EFG": "-efg",
|
||||||
|
@ -34,8 +34,186 @@ class UsageApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.any_key_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
||||||
|
'auth': [
|
||||||
|
'api_key',
|
||||||
|
'api_key_query'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/any',
|
||||||
|
'operation_id': 'any_key',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.both_keys_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
||||||
|
'auth': [
|
||||||
|
'api_key',
|
||||||
|
'api_key_query'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/both',
|
||||||
|
'operation_id': 'both_keys',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.key_in_header_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
||||||
|
'auth': [
|
||||||
|
'api_key'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/header',
|
||||||
|
'operation_id': 'key_in_header',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.key_in_query_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
||||||
|
'auth': [
|
||||||
|
'api_key_query'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/query',
|
||||||
|
'operation_id': 'key_in_query',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __any_key(
|
def any_key(
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -94,56 +272,9 @@ class UsageApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.any_key_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.any_key = _Endpoint(
|
def both_keys(
|
||||||
settings={
|
|
||||||
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
|
||||||
'auth': [
|
|
||||||
'api_key',
|
|
||||||
'api_key_query'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/any',
|
|
||||||
'operation_id': 'any_key',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__any_key
|
|
||||||
)
|
|
||||||
|
|
||||||
def __both_keys(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -202,56 +333,9 @@ class UsageApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.both_keys_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.both_keys = _Endpoint(
|
def key_in_header(
|
||||||
settings={
|
|
||||||
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
|
||||||
'auth': [
|
|
||||||
'api_key',
|
|
||||||
'api_key_query'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/both',
|
|
||||||
'operation_id': 'both_keys',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__both_keys
|
|
||||||
)
|
|
||||||
|
|
||||||
def __key_in_header(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -310,55 +394,9 @@ class UsageApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.key_in_header_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.key_in_header = _Endpoint(
|
def key_in_query(
|
||||||
settings={
|
|
||||||
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
|
||||||
'auth': [
|
|
||||||
'api_key'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/header',
|
|
||||||
'operation_id': 'key_in_header',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__key_in_header
|
|
||||||
)
|
|
||||||
|
|
||||||
def __key_in_query(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -417,50 +455,5 @@ class UsageApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.key_in_query_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.key_in_query = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
|
||||||
'auth': [
|
|
||||||
'api_key_query'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/query',
|
|
||||||
'operation_id': 'key_in_query',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__key_in_query
|
|
||||||
)
|
|
||||||
|
@ -34,69 +34,7 @@ class UsageApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.custom_server_endpoint = _Endpoint(
|
||||||
def __custom_server(
|
|
||||||
self,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Use custom server # noqa: E501
|
|
||||||
|
|
||||||
Use custom server # noqa: E501
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.custom_server(async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
||||||
one number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.custom_server = _Endpoint(
|
|
||||||
settings={
|
settings={
|
||||||
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
||||||
'auth': [],
|
'auth': [],
|
||||||
@ -185,11 +123,113 @@ class UsageApi(object):
|
|||||||
],
|
],
|
||||||
'content_type': [],
|
'content_type': [],
|
||||||
},
|
},
|
||||||
api_client=api_client,
|
api_client=api_client
|
||||||
callable=__custom_server
|
)
|
||||||
|
self.default_server_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/default',
|
||||||
|
'operation_id': 'default_server',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
)
|
)
|
||||||
|
|
||||||
def __default_server(
|
def custom_server(
|
||||||
|
self,
|
||||||
|
**kwargs
|
||||||
|
):
|
||||||
|
"""Use custom server # noqa: E501
|
||||||
|
|
||||||
|
Use custom server # noqa: E501
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.custom_server(async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
|
||||||
|
Keyword Args:
|
||||||
|
_return_http_data_only (bool): response data without head status
|
||||||
|
code and headers. Default is True.
|
||||||
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||||
|
will be returned without reading/decoding response data.
|
||||||
|
Default is True.
|
||||||
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
||||||
|
one number provided, it will be total request timeout. It can also
|
||||||
|
be a pair (tuple) of (connection, read) timeouts.
|
||||||
|
Default is None.
|
||||||
|
_check_input_type (bool): specifies if type checking
|
||||||
|
should be done one the data sent to the server.
|
||||||
|
Default is True.
|
||||||
|
_check_return_type (bool): specifies if type checking
|
||||||
|
should be done one the data received from the server.
|
||||||
|
Default is True.
|
||||||
|
_host_index (int/None): specifies the index of the server
|
||||||
|
that we want to use.
|
||||||
|
Default is read from the configuration.
|
||||||
|
async_req (bool): execute request asynchronously
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
|
||||||
|
If the method is called asynchronously, returns the request
|
||||||
|
thread.
|
||||||
|
"""
|
||||||
|
kwargs['async_req'] = kwargs.get(
|
||||||
|
'async_req', False
|
||||||
|
)
|
||||||
|
kwargs['_return_http_data_only'] = kwargs.get(
|
||||||
|
'_return_http_data_only', True
|
||||||
|
)
|
||||||
|
kwargs['_preload_content'] = kwargs.get(
|
||||||
|
'_preload_content', True
|
||||||
|
)
|
||||||
|
kwargs['_request_timeout'] = kwargs.get(
|
||||||
|
'_request_timeout', None
|
||||||
|
)
|
||||||
|
kwargs['_check_input_type'] = kwargs.get(
|
||||||
|
'_check_input_type', True
|
||||||
|
)
|
||||||
|
kwargs['_check_return_type'] = kwargs.get(
|
||||||
|
'_check_return_type', True
|
||||||
|
)
|
||||||
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
|
return self.custom_server_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
|
def default_server(
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -248,48 +288,5 @@ class UsageApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.default_server_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.default_server = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/default',
|
|
||||||
'operation_id': 'default_server',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__default_server
|
|
||||||
)
|
|
||||||
|
@ -35,8 +35,58 @@ class AnotherFakeApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.call_123_test_special_tags_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Client,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/another-fake/dummy',
|
||||||
|
'operation_id': 'call_123_test_special_tags',
|
||||||
|
'http_method': 'PATCH',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'client',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'client',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'client':
|
||||||
|
(Client,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'client': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __call_123_test_special_tags(
|
def call_123_test_special_tags(
|
||||||
self,
|
self,
|
||||||
client,
|
client,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,56 +150,5 @@ class AnotherFakeApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['client'] = \
|
kwargs['client'] = \
|
||||||
client
|
client
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.call_123_test_special_tags_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.call_123_test_special_tags = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Client,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/another-fake/dummy',
|
|
||||||
'operation_id': 'call_123_test_special_tags',
|
|
||||||
'http_method': 'PATCH',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'client',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'client',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'client':
|
|
||||||
(Client,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'client': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__call_123_test_special_tags
|
|
||||||
)
|
|
||||||
|
@ -35,8 +35,50 @@ class DefaultApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.foo_get_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (InlineResponseDefault,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/foo',
|
||||||
|
'operation_id': 'foo_get',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __foo_get(
|
def foo_get(
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -94,48 +136,5 @@ class DefaultApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.foo_get_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.foo_get = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponseDefault,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/foo',
|
|
||||||
'operation_id': 'foo_get',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__foo_get
|
|
||||||
)
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,60 @@ class FakeClassnameTags123Api(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.test_classname_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Client,),
|
||||||
|
'auth': [
|
||||||
|
'api_key_query'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/fake_classname_test',
|
||||||
|
'operation_id': 'test_classname',
|
||||||
|
'http_method': 'PATCH',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'client',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'client',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'client':
|
||||||
|
(Client,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'client': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __test_classname(
|
def test_classname(
|
||||||
self,
|
self,
|
||||||
client,
|
client,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,58 +152,5 @@ class FakeClassnameTags123Api(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['client'] = \
|
kwargs['client'] = \
|
||||||
client
|
client
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.test_classname_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.test_classname = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Client,),
|
|
||||||
'auth': [
|
|
||||||
'api_key_query'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/fake_classname_test',
|
|
||||||
'operation_id': 'test_classname',
|
|
||||||
'http_method': 'PATCH',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'client',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'client',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'client':
|
|
||||||
(Client,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'client': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__test_classname
|
|
||||||
)
|
|
||||||
|
@ -35,8 +35,412 @@ class PetApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.add_pet_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [
|
||||||
|
'http_signature_test',
|
||||||
|
'petstore_auth'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/pet',
|
||||||
|
'operation_id': 'add_pet',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': [
|
||||||
|
{
|
||||||
|
'url': "http://petstore.swagger.io/v2",
|
||||||
|
'description': "No description provided",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'url': "http://path-server-test.petstore.local/v2",
|
||||||
|
'description': "No description provided",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'pet',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'pet',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'pet':
|
||||||
|
(Pet,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'pet': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [
|
||||||
|
'application/json',
|
||||||
|
'application/xml'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.delete_pet_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [
|
||||||
|
'petstore_auth'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/pet/{petId}',
|
||||||
|
'operation_id': 'delete_pet',
|
||||||
|
'http_method': 'DELETE',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'pet_id',
|
||||||
|
'api_key',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'pet_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'pet_id':
|
||||||
|
(int,),
|
||||||
|
'api_key':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'pet_id': 'petId',
|
||||||
|
'api_key': 'api_key',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'pet_id': 'path',
|
||||||
|
'api_key': 'header',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.find_pets_by_status_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ([Pet],),
|
||||||
|
'auth': [
|
||||||
|
'http_signature_test',
|
||||||
|
'petstore_auth'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/pet/findByStatus',
|
||||||
|
'operation_id': 'find_pets_by_status',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'status',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'status',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
'status',
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
('status',): {
|
||||||
|
|
||||||
def __add_pet(
|
"AVAILABLE": "available",
|
||||||
|
"PENDING": "pending",
|
||||||
|
"SOLD": "sold"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'status':
|
||||||
|
([str],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'status': 'status',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'status': 'query',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
'status': 'csv',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.find_pets_by_tags_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ([Pet],),
|
||||||
|
'auth': [
|
||||||
|
'http_signature_test',
|
||||||
|
'petstore_auth'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/pet/findByTags',
|
||||||
|
'operation_id': 'find_pets_by_tags',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'tags',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'tags',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'tags':
|
||||||
|
([str],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'tags': 'tags',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'tags': 'query',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
'tags': 'csv',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_pet_by_id_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Pet,),
|
||||||
|
'auth': [
|
||||||
|
'api_key'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/pet/{petId}',
|
||||||
|
'operation_id': 'get_pet_by_id',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'pet_id',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'pet_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'pet_id':
|
||||||
|
(int,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'pet_id': 'petId',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'pet_id': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.update_pet_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [
|
||||||
|
'http_signature_test',
|
||||||
|
'petstore_auth'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/pet',
|
||||||
|
'operation_id': 'update_pet',
|
||||||
|
'http_method': 'PUT',
|
||||||
|
'servers': [
|
||||||
|
{
|
||||||
|
'url': "http://petstore.swagger.io/v2",
|
||||||
|
'description': "No description provided",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'url': "http://path-server-test.petstore.local/v2",
|
||||||
|
'description': "No description provided",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'pet',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'pet',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'pet':
|
||||||
|
(Pet,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'pet': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [
|
||||||
|
'application/json',
|
||||||
|
'application/xml'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.update_pet_with_form_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [
|
||||||
|
'petstore_auth'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/pet/{petId}',
|
||||||
|
'operation_id': 'update_pet_with_form',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'pet_id',
|
||||||
|
'name',
|
||||||
|
'status',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'pet_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'pet_id':
|
||||||
|
(int,),
|
||||||
|
'name':
|
||||||
|
(str,),
|
||||||
|
'status':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'pet_id': 'petId',
|
||||||
|
'name': 'name',
|
||||||
|
'status': 'status',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'pet_id': 'path',
|
||||||
|
'name': 'form',
|
||||||
|
'status': 'form',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [
|
||||||
|
'application/x-www-form-urlencoded'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
|
def add_pet(
|
||||||
self,
|
self,
|
||||||
pet,
|
pet,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -99,72 +503,9 @@ class PetApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['pet'] = \
|
kwargs['pet'] = \
|
||||||
pet
|
pet
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.add_pet_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.add_pet = _Endpoint(
|
def delete_pet(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [
|
|
||||||
'http_signature_test',
|
|
||||||
'petstore_auth'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/pet',
|
|
||||||
'operation_id': 'add_pet',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': [
|
|
||||||
{
|
|
||||||
'url': "http://petstore.swagger.io/v2",
|
|
||||||
'description': "No description provided",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'url': "http://path-server-test.petstore.local/v2",
|
|
||||||
'description': "No description provided",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'pet',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'pet',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'pet':
|
|
||||||
(Pet,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'pet': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [
|
|
||||||
'application/json',
|
|
||||||
'application/xml'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__add_pet
|
|
||||||
)
|
|
||||||
|
|
||||||
def __delete_pet(
|
|
||||||
self,
|
self,
|
||||||
pet_id,
|
pet_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -228,65 +569,9 @@ class PetApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['pet_id'] = \
|
kwargs['pet_id'] = \
|
||||||
pet_id
|
pet_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.delete_pet_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.delete_pet = _Endpoint(
|
def find_pets_by_status(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [
|
|
||||||
'petstore_auth'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/pet/{petId}',
|
|
||||||
'operation_id': 'delete_pet',
|
|
||||||
'http_method': 'DELETE',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'pet_id',
|
|
||||||
'api_key',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'pet_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'pet_id':
|
|
||||||
(int,),
|
|
||||||
'api_key':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'pet_id': 'petId',
|
|
||||||
'api_key': 'api_key',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'pet_id': 'path',
|
|
||||||
'api_key': 'header',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__delete_pet
|
|
||||||
)
|
|
||||||
|
|
||||||
def __find_pets_by_status(
|
|
||||||
self,
|
self,
|
||||||
status,
|
status,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -350,72 +635,9 @@ class PetApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['status'] = \
|
kwargs['status'] = \
|
||||||
status
|
status
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.find_pets_by_status_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.find_pets_by_status = _Endpoint(
|
def find_pets_by_tags(
|
||||||
settings={
|
|
||||||
'response_type': ([Pet],),
|
|
||||||
'auth': [
|
|
||||||
'http_signature_test',
|
|
||||||
'petstore_auth'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/pet/findByStatus',
|
|
||||||
'operation_id': 'find_pets_by_status',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'status',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'status',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
'status',
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
('status',): {
|
|
||||||
|
|
||||||
"AVAILABLE": "available",
|
|
||||||
"PENDING": "pending",
|
|
||||||
"SOLD": "sold"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'status':
|
|
||||||
([str],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'status': 'status',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'status': 'query',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
'status': 'csv',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__find_pets_by_status
|
|
||||||
)
|
|
||||||
|
|
||||||
def __find_pets_by_tags(
|
|
||||||
self,
|
self,
|
||||||
tags,
|
tags,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -479,65 +701,9 @@ class PetApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['tags'] = \
|
kwargs['tags'] = \
|
||||||
tags
|
tags
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.find_pets_by_tags_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.find_pets_by_tags = _Endpoint(
|
def get_pet_by_id(
|
||||||
settings={
|
|
||||||
'response_type': ([Pet],),
|
|
||||||
'auth': [
|
|
||||||
'http_signature_test',
|
|
||||||
'petstore_auth'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/pet/findByTags',
|
|
||||||
'operation_id': 'find_pets_by_tags',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'tags',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'tags',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'tags':
|
|
||||||
([str],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'tags': 'tags',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'tags': 'query',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
'tags': 'csv',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__find_pets_by_tags
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_pet_by_id(
|
|
||||||
self,
|
self,
|
||||||
pet_id,
|
pet_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -601,63 +767,9 @@ class PetApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['pet_id'] = \
|
kwargs['pet_id'] = \
|
||||||
pet_id
|
pet_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_pet_by_id_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_pet_by_id = _Endpoint(
|
def update_pet(
|
||||||
settings={
|
|
||||||
'response_type': (Pet,),
|
|
||||||
'auth': [
|
|
||||||
'api_key'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/pet/{petId}',
|
|
||||||
'operation_id': 'get_pet_by_id',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'pet_id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'pet_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'pet_id':
|
|
||||||
(int,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'pet_id': 'petId',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'pet_id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_pet_by_id
|
|
||||||
)
|
|
||||||
|
|
||||||
def __update_pet(
|
|
||||||
self,
|
self,
|
||||||
pet,
|
pet,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -720,72 +832,9 @@ class PetApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['pet'] = \
|
kwargs['pet'] = \
|
||||||
pet
|
pet
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.update_pet_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.update_pet = _Endpoint(
|
def update_pet_with_form(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [
|
|
||||||
'http_signature_test',
|
|
||||||
'petstore_auth'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/pet',
|
|
||||||
'operation_id': 'update_pet',
|
|
||||||
'http_method': 'PUT',
|
|
||||||
'servers': [
|
|
||||||
{
|
|
||||||
'url': "http://petstore.swagger.io/v2",
|
|
||||||
'description': "No description provided",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'url': "http://path-server-test.petstore.local/v2",
|
|
||||||
'description': "No description provided",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'pet',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'pet',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'pet':
|
|
||||||
(Pet,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'pet': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [
|
|
||||||
'application/json',
|
|
||||||
'application/xml'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__update_pet
|
|
||||||
)
|
|
||||||
|
|
||||||
def __update_pet_with_form(
|
|
||||||
self,
|
self,
|
||||||
pet_id,
|
pet_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -850,67 +899,5 @@ class PetApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['pet_id'] = \
|
kwargs['pet_id'] = \
|
||||||
pet_id
|
pet_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.update_pet_with_form_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.update_pet_with_form = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [
|
|
||||||
'petstore_auth'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/pet/{petId}',
|
|
||||||
'operation_id': 'update_pet_with_form',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'pet_id',
|
|
||||||
'name',
|
|
||||||
'status',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'pet_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'pet_id':
|
|
||||||
(int,),
|
|
||||||
'name':
|
|
||||||
(str,),
|
|
||||||
'status':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'pet_id': 'petId',
|
|
||||||
'name': 'name',
|
|
||||||
'status': 'status',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'pet_id': 'path',
|
|
||||||
'name': 'form',
|
|
||||||
'status': 'form',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [
|
|
||||||
'application/x-www-form-urlencoded'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__update_pet_with_form
|
|
||||||
)
|
|
||||||
|
@ -35,8 +35,206 @@ class StoreApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.delete_order_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order/{order_id}',
|
||||||
|
'operation_id': 'delete_order',
|
||||||
|
'http_method': 'DELETE',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'order_id':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'order_id': 'order_id',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'order_id': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_inventory_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': ({str: (int,)},),
|
||||||
|
'auth': [
|
||||||
|
'api_key'
|
||||||
|
],
|
||||||
|
'endpoint_path': '/store/inventory',
|
||||||
|
'operation_id': 'get_inventory',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_order_by_id_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Order,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order/{order_id}',
|
||||||
|
'operation_id': 'get_order_by_id',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'order_id',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
'order_id',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
('order_id',): {
|
||||||
|
|
||||||
def __delete_order(
|
'inclusive_maximum': 5,
|
||||||
|
'inclusive_minimum': 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'order_id':
|
||||||
|
(int,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'order_id': 'order_id',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'order_id': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.place_order_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (Order,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/store/order',
|
||||||
|
'operation_id': 'place_order',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'order',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'order',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'order':
|
||||||
|
(Order,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'order': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
|
def delete_order(
|
||||||
self,
|
self,
|
||||||
order_id,
|
order_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,58 +298,9 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['order_id'] = \
|
kwargs['order_id'] = \
|
||||||
order_id
|
order_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.delete_order_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.delete_order = _Endpoint(
|
def get_inventory(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order/{order_id}',
|
|
||||||
'operation_id': 'delete_order',
|
|
||||||
'http_method': 'DELETE',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'order_id':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'order_id': 'order_id',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'order_id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__delete_order
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_inventory(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -210,55 +359,9 @@ class StoreApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_inventory_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_inventory = _Endpoint(
|
def get_order_by_id(
|
||||||
settings={
|
|
||||||
'response_type': ({str: (int,)},),
|
|
||||||
'auth': [
|
|
||||||
'api_key'
|
|
||||||
],
|
|
||||||
'endpoint_path': '/store/inventory',
|
|
||||||
'operation_id': 'get_inventory',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_inventory
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_order_by_id(
|
|
||||||
self,
|
self,
|
||||||
order_id,
|
order_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -322,67 +425,9 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['order_id'] = \
|
kwargs['order_id'] = \
|
||||||
order_id
|
order_id
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_order_by_id_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_order_by_id = _Endpoint(
|
def place_order(
|
||||||
settings={
|
|
||||||
'response_type': (Order,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order/{order_id}',
|
|
||||||
'operation_id': 'get_order_by_id',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'order_id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
'order_id',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
('order_id',): {
|
|
||||||
|
|
||||||
'inclusive_maximum': 5,
|
|
||||||
'inclusive_minimum': 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'order_id':
|
|
||||||
(int,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'order_id': 'order_id',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'order_id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_order_by_id
|
|
||||||
)
|
|
||||||
|
|
||||||
def __place_order(
|
|
||||||
self,
|
self,
|
||||||
order,
|
order,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -445,57 +490,5 @@ class StoreApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['order'] = \
|
kwargs['order'] = \
|
||||||
order
|
order
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.place_order_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.place_order = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (Order,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/store/order',
|
|
||||||
'operation_id': 'place_order',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'order',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'order',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'order':
|
|
||||||
(Order,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'order': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__place_order
|
|
||||||
)
|
|
||||||
|
@ -35,8 +35,399 @@ class UserApi(object):
|
|||||||
if api_client is None:
|
if api_client is None:
|
||||||
api_client = ApiClient()
|
api_client = ApiClient()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
self.create_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user',
|
||||||
|
'operation_id': 'create_user',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'user':
|
||||||
|
(User,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'user': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.create_users_with_array_input_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/createWithArray',
|
||||||
|
'operation_id': 'create_users_with_array_input',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'user':
|
||||||
|
([User],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'user': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.create_users_with_list_input_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/createWithList',
|
||||||
|
'operation_id': 'create_users_with_list_input',
|
||||||
|
'http_method': 'POST',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'user':
|
||||||
|
([User],),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'user': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.delete_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'delete_user',
|
||||||
|
'http_method': 'DELETE',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.get_user_by_name_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (User,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'get_user_by_name',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.login_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': (str,),
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/login',
|
||||||
|
'operation_id': 'login_user',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
'password',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
'password',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
'password':
|
||||||
|
(str,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
'password': 'password',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'query',
|
||||||
|
'password': 'query',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.logout_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/logout',
|
||||||
|
'operation_id': 'logout_user',
|
||||||
|
'http_method': 'GET',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
],
|
||||||
|
'required': [],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [],
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
self.update_user_endpoint = _Endpoint(
|
||||||
|
settings={
|
||||||
|
'response_type': None,
|
||||||
|
'auth': [],
|
||||||
|
'endpoint_path': '/user/{username}',
|
||||||
|
'operation_id': 'update_user',
|
||||||
|
'http_method': 'PUT',
|
||||||
|
'servers': None,
|
||||||
|
},
|
||||||
|
params_map={
|
||||||
|
'all': [
|
||||||
|
'username',
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'required': [
|
||||||
|
'username',
|
||||||
|
'user',
|
||||||
|
],
|
||||||
|
'nullable': [
|
||||||
|
],
|
||||||
|
'enum': [
|
||||||
|
],
|
||||||
|
'validation': [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
root_map={
|
||||||
|
'validations': {
|
||||||
|
},
|
||||||
|
'allowed_values': {
|
||||||
|
},
|
||||||
|
'openapi_types': {
|
||||||
|
'username':
|
||||||
|
(str,),
|
||||||
|
'user':
|
||||||
|
(User,),
|
||||||
|
},
|
||||||
|
'attribute_map': {
|
||||||
|
'username': 'username',
|
||||||
|
},
|
||||||
|
'location_map': {
|
||||||
|
'username': 'path',
|
||||||
|
'user': 'body',
|
||||||
|
},
|
||||||
|
'collection_format_map': {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers_map={
|
||||||
|
'accept': [],
|
||||||
|
'content_type': [
|
||||||
|
'application/json'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
api_client=api_client
|
||||||
|
)
|
||||||
|
|
||||||
def __create_user(
|
def create_user(
|
||||||
self,
|
self,
|
||||||
user,
|
user,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -100,59 +491,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['user'] = \
|
kwargs['user'] = \
|
||||||
user
|
user
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_user = _Endpoint(
|
def create_users_with_array_input(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user',
|
|
||||||
'operation_id': 'create_user',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'user':
|
|
||||||
(User,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'user': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __create_users_with_array_input(
|
|
||||||
self,
|
self,
|
||||||
user,
|
user,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -215,59 +556,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['user'] = \
|
kwargs['user'] = \
|
||||||
user
|
user
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_users_with_array_input_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_users_with_array_input = _Endpoint(
|
def create_users_with_list_input(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/createWithArray',
|
|
||||||
'operation_id': 'create_users_with_array_input',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'user':
|
|
||||||
([User],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'user': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_users_with_array_input
|
|
||||||
)
|
|
||||||
|
|
||||||
def __create_users_with_list_input(
|
|
||||||
self,
|
self,
|
||||||
user,
|
user,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -330,59 +621,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['user'] = \
|
kwargs['user'] = \
|
||||||
user
|
user
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.create_users_with_list_input_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.create_users_with_list_input = _Endpoint(
|
def delete_user(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/createWithList',
|
|
||||||
'operation_id': 'create_users_with_list_input',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'user':
|
|
||||||
([User],),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'user': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__create_users_with_list_input
|
|
||||||
)
|
|
||||||
|
|
||||||
def __delete_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -446,58 +687,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['username'] = \
|
kwargs['username'] = \
|
||||||
username
|
username
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.delete_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.delete_user = _Endpoint(
|
def get_user_by_name(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'delete_user',
|
|
||||||
'http_method': 'DELETE',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__delete_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_user_by_name(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -560,61 +752,9 @@ class UserApi(object):
|
|||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
kwargs['username'] = \
|
kwargs['username'] = \
|
||||||
username
|
username
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.get_user_by_name_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.get_user_by_name = _Endpoint(
|
def login_user(
|
||||||
settings={
|
|
||||||
'response_type': (User,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'get_user_by_name',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_user_by_name
|
|
||||||
)
|
|
||||||
|
|
||||||
def __login_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
@ -681,67 +821,9 @@ class UserApi(object):
|
|||||||
username
|
username
|
||||||
kwargs['password'] = \
|
kwargs['password'] = \
|
||||||
password
|
password
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.login_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.login_user = _Endpoint(
|
def logout_user(
|
||||||
settings={
|
|
||||||
'response_type': (str,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/login',
|
|
||||||
'operation_id': 'login_user',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
'password',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
'password',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
'password':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
'password': 'password',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'query',
|
|
||||||
'password': 'query',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/xml',
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__login_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __logout_user(
|
|
||||||
self,
|
self,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -799,51 +881,9 @@ class UserApi(object):
|
|||||||
'_check_return_type', True
|
'_check_return_type', True
|
||||||
)
|
)
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.logout_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.logout_user = _Endpoint(
|
def update_user(
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/logout',
|
|
||||||
'operation_id': 'logout_user',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__logout_user
|
|
||||||
)
|
|
||||||
|
|
||||||
def __update_user(
|
|
||||||
self,
|
self,
|
||||||
username,
|
username,
|
||||||
user,
|
user,
|
||||||
@ -911,60 +951,5 @@ class UserApi(object):
|
|||||||
username
|
username
|
||||||
kwargs['user'] = \
|
kwargs['user'] = \
|
||||||
user
|
user
|
||||||
return self.call_with_http_info(**kwargs)
|
return self.update_user_endpoint.call_with_http_info(**kwargs)
|
||||||
|
|
||||||
self.update_user = _Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': None,
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/user/{username}',
|
|
||||||
'operation_id': 'update_user',
|
|
||||||
'http_method': 'PUT',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'username',
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'username',
|
|
||||||
'user',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'username':
|
|
||||||
(str,),
|
|
||||||
'user':
|
|
||||||
(User,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'username': 'username',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'username': 'path',
|
|
||||||
'user': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__update_user
|
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user