Merge remote-tracking branch 'origin' into 7.0.x

This commit is contained in:
William Cheng
2023-03-03 21:52:50 +08:00
10595 changed files with 418520 additions and 73194 deletions

View File

@@ -61,14 +61,14 @@ configuration = petstore_api.Configuration(
# Enter a context with an instance of the API client
with petstore_api.ApiClient(configuration) as api_client:
async with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.AnotherFakeApi(api_client)
body = petstore_api.Client() # Client | client model
try:
# To test special tags
api_response = api_instance.call_123_test_special_tags(body)
api_response = await api_instance.call_123_test_special_tags(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
@@ -175,6 +175,16 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
## petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## api_key
- **Type**: API key
@@ -194,16 +204,6 @@ Class | Method | HTTP request | Description
- **Type**: HTTP basic authentication
## petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## Author

View File

@@ -4,14 +4,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_string** | **dict(str, str)** | | [optional]
**map_number** | **dict(str, float)** | | [optional]
**map_integer** | **dict(str, int)** | | [optional]
**map_boolean** | **dict(str, bool)** | | [optional]
**map_array_integer** | **dict(str, list[int])** | | [optional]
**map_array_anytype** | **dict(str, list[object])** | | [optional]
**map_map_string** | **dict(str, dict(str, str))** | | [optional]
**map_map_anytype** | **dict(str, dict(str, object))** | | [optional]
**map_string** | **dict[str, str]** | | [optional]
**map_number** | **dict[str, float]** | | [optional]
**map_integer** | **dict[str, int]** | | [optional]
**map_boolean** | **dict[str, bool]** | | [optional]
**map_array_integer** | **dict[str, list[int]]** | | [optional]
**map_array_anytype** | **dict[str, list[object]]** | | [optional]
**map_map_string** | **dict[str, dict[str, str]]** | | [optional]
**map_map_anytype** | **dict[str, dict[str, object]]** | | [optional]
**anytype_1** | **object** | | [optional]
**anytype_2** | **object** | | [optional]
**anytype_3** | **object** | | [optional]

View File

@@ -749,7 +749,7 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**400** | Someting wrong | - |
**400** | Something wrong | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -777,7 +777,7 @@ configuration = petstore_api.Configuration(
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
param = {'key': 'param_example'} # dict(str, str) | request body
param = {'key': 'param_example'} # dict[str, str] | request body
try:
# test inline additionalProperties
@@ -790,7 +790,7 @@ with petstore_api.ApiClient() as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**param** | [**dict(str, str)**](str.md)| request body |
**param** | [**dict[str, str]**](str.md)| request body |
### Return type

View File

@@ -4,10 +4,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_map_of_string** | **dict(str, dict(str, str))** | | [optional]
**map_of_enum_string** | **dict(str, str)** | | [optional]
**direct_map** | **dict(str, bool)** | | [optional]
**indirect_map** | **dict(str, bool)** | | [optional]
**map_map_of_string** | **dict[str, dict[str, str]]** | | [optional]
**map_of_enum_string** | **dict[str, str]** | | [optional]
**direct_map** | **dict[str, bool]** | | [optional]
**indirect_map** | **dict[str, bool]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **str** | | [optional]
**date_time** | **datetime** | | [optional]
**map** | [**dict(str, Animal)**](Animal.md) | | [optional]
**map** | [**dict[str, Animal]**](Animal.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -73,7 +73,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_inventory**
> dict(str, int) get_inventory()
> dict[str, int] get_inventory()
Returns pet inventories by status
@@ -123,7 +123,7 @@ This endpoint does not need any parameter.
### Return type
**dict(str, int)**
**dict[str, int]**
### Authorization
@@ -146,7 +146,7 @@ This endpoint does not need any parameter.
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
### Example

View File

@@ -1779,7 +1779,7 @@ class FakeApi(object):
>>> result = thread.get()
:param param: request body (required)
:type param: dict(str, str)
:type param: dict[str, str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1808,7 +1808,7 @@ class FakeApi(object):
>>> result = thread.get()
:param param: request body (required)
:type param: dict(str, str)
:type param: dict[str, str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code

View File

@@ -190,7 +190,7 @@ class StoreApi(object):
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: dict(str, int)
:rtype: dict[str, int]
"""
kwargs['_return_http_data_only'] = True
return self.get_inventory_with_http_info(**kwargs) # noqa: E501
@@ -226,7 +226,7 @@ class StoreApi(object):
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(dict(str, int), status_code(int), headers(HTTPHeaderDict))
:rtype: tuple(dict[str, int], status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
@@ -274,7 +274,7 @@ class StoreApi(object):
auth_settings = ['api_key'] # noqa: E501
response_types_map = {
200: "dict(str, int)",
200: "dict[str, int]",
}
return self.api_client.call_api(
@@ -297,7 +297,7 @@ class StoreApi(object):
def get_order_by_id(self, order_id, **kwargs): # noqa: E501
"""Find purchase order by ID # noqa: E501
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
@@ -327,7 +327,7 @@ class StoreApi(object):
def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
"""Find purchase order by ID # noqa: E501
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

View File

@@ -302,8 +302,8 @@ class ApiClient(object):
return [self.__deserialize(sub_data, sub_kls)
for sub_data in data]
if klass.startswith('dict('):
sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
if klass.startswith('dict['):
sub_kls = re.match(r'dict\[([^,]*), (.*)\]', klass).group(2)
return {k: self.__deserialize(v, sub_kls)
for k, v in six.iteritems(data)}
@@ -692,6 +692,7 @@ class ApiClient(object):
value = data[klass.attribute_map[attr]]
kwargs[attr] = self.__deserialize(value, attr_type)
kwargs["local_vars_configuration"] = self.configuration
instance = klass(**kwargs)
if has_discriminator:

View File

@@ -405,6 +405,13 @@ conf = petstore_api.Configuration(
:return: The Auth Settings information dict.
"""
auth = {}
if self.access_token is not None:
auth['petstore_auth'] = {
'type': 'oauth2',
'in': 'header',
'key': 'Authorization',
'value': 'Bearer ' + self.access_token
}
if 'api_key' in self.api_key:
auth['api_key'] = {
'type': 'api_key',
@@ -430,13 +437,6 @@ conf = petstore_api.Configuration(
'key': 'Authorization',
'value': self.get_basic_auth_token()
}
if self.access_token is not None:
auth['petstore_auth'] = {
'type': 'oauth2',
'in': 'header',
'key': 'Authorization',
'value': 'Bearer ' + self.access_token
}
return auth
def to_debug_report(self):

View File

@@ -36,14 +36,14 @@ class AdditionalPropertiesClass(object):
and the value is json key in definition.
"""
openapi_types = {
'map_string': 'dict(str, str)',
'map_number': 'dict(str, float)',
'map_integer': 'dict(str, int)',
'map_boolean': 'dict(str, bool)',
'map_array_integer': 'dict(str, list[int])',
'map_array_anytype': 'dict(str, list[object])',
'map_map_string': 'dict(str, dict(str, str))',
'map_map_anytype': 'dict(str, dict(str, object))',
'map_string': 'dict[str, str]',
'map_number': 'dict[str, float]',
'map_integer': 'dict[str, int]',
'map_boolean': 'dict[str, bool]',
'map_array_integer': 'dict[str, list[int]]',
'map_array_anytype': 'dict[str, list[object]]',
'map_map_string': 'dict[str, dict[str, str]]',
'map_map_anytype': 'dict[str, dict[str, object]]',
'anytype_1': 'object',
'anytype_2': 'object',
'anytype_3': 'object'
@@ -111,7 +111,7 @@ class AdditionalPropertiesClass(object):
:return: The map_string of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, str)
:rtype: dict[str, str]
"""
return self._map_string
@@ -121,7 +121,7 @@ class AdditionalPropertiesClass(object):
:param map_string: The map_string of this AdditionalPropertiesClass. # noqa: E501
:type map_string: dict(str, str)
:type map_string: dict[str, str]
"""
self._map_string = map_string
@@ -132,7 +132,7 @@ class AdditionalPropertiesClass(object):
:return: The map_number of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, float)
:rtype: dict[str, float]
"""
return self._map_number
@@ -142,7 +142,7 @@ class AdditionalPropertiesClass(object):
:param map_number: The map_number of this AdditionalPropertiesClass. # noqa: E501
:type map_number: dict(str, float)
:type map_number: dict[str, float]
"""
self._map_number = map_number
@@ -153,7 +153,7 @@ class AdditionalPropertiesClass(object):
:return: The map_integer of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, int)
:rtype: dict[str, int]
"""
return self._map_integer
@@ -163,7 +163,7 @@ class AdditionalPropertiesClass(object):
:param map_integer: The map_integer of this AdditionalPropertiesClass. # noqa: E501
:type map_integer: dict(str, int)
:type map_integer: dict[str, int]
"""
self._map_integer = map_integer
@@ -174,7 +174,7 @@ class AdditionalPropertiesClass(object):
:return: The map_boolean of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, bool)
:rtype: dict[str, bool]
"""
return self._map_boolean
@@ -184,7 +184,7 @@ class AdditionalPropertiesClass(object):
:param map_boolean: The map_boolean of this AdditionalPropertiesClass. # noqa: E501
:type map_boolean: dict(str, bool)
:type map_boolean: dict[str, bool]
"""
self._map_boolean = map_boolean
@@ -195,7 +195,7 @@ class AdditionalPropertiesClass(object):
:return: The map_array_integer of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, list[int])
:rtype: dict[str, list[int]]
"""
return self._map_array_integer
@@ -205,7 +205,7 @@ class AdditionalPropertiesClass(object):
:param map_array_integer: The map_array_integer of this AdditionalPropertiesClass. # noqa: E501
:type map_array_integer: dict(str, list[int])
:type map_array_integer: dict[str, list[int]]
"""
self._map_array_integer = map_array_integer
@@ -216,7 +216,7 @@ class AdditionalPropertiesClass(object):
:return: The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, list[object])
:rtype: dict[str, list[object]]
"""
return self._map_array_anytype
@@ -226,7 +226,7 @@ class AdditionalPropertiesClass(object):
:param map_array_anytype: The map_array_anytype of this AdditionalPropertiesClass. # noqa: E501
:type map_array_anytype: dict(str, list[object])
:type map_array_anytype: dict[str, list[object]]
"""
self._map_array_anytype = map_array_anytype
@@ -237,7 +237,7 @@ class AdditionalPropertiesClass(object):
:return: The map_map_string of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, dict(str, str))
:rtype: dict[str, dict[str, str]]
"""
return self._map_map_string
@@ -247,7 +247,7 @@ class AdditionalPropertiesClass(object):
:param map_map_string: The map_map_string of this AdditionalPropertiesClass. # noqa: E501
:type map_map_string: dict(str, dict(str, str))
:type map_map_string: dict[str, dict[str, str]]
"""
self._map_map_string = map_map_string
@@ -258,7 +258,7 @@ class AdditionalPropertiesClass(object):
:return: The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, dict(str, object))
:rtype: dict[str, dict[str, object]]
"""
return self._map_map_anytype
@@ -268,7 +268,7 @@ class AdditionalPropertiesClass(object):
:param map_map_anytype: The map_map_anytype of this AdditionalPropertiesClass. # noqa: E501
:type map_map_anytype: dict(str, dict(str, object))
:type map_map_anytype: dict[str, dict[str, object]]
"""
self._map_map_anytype = map_map_anytype

View File

@@ -36,10 +36,10 @@ class MapTest(object):
and the value is json key in definition.
"""
openapi_types = {
'map_map_of_string': 'dict(str, dict(str, str))',
'map_of_enum_string': 'dict(str, str)',
'direct_map': 'dict(str, bool)',
'indirect_map': 'dict(str, bool)'
'map_map_of_string': 'dict[str, dict[str, str]]',
'map_of_enum_string': 'dict[str, str]',
'direct_map': 'dict[str, bool]',
'indirect_map': 'dict[str, bool]'
}
attribute_map = {
@@ -76,7 +76,7 @@ class MapTest(object):
:return: The map_map_of_string of this MapTest. # noqa: E501
:rtype: dict(str, dict(str, str))
:rtype: dict[str, dict[str, str]]
"""
return self._map_map_of_string
@@ -86,7 +86,7 @@ class MapTest(object):
:param map_map_of_string: The map_map_of_string of this MapTest. # noqa: E501
:type map_map_of_string: dict(str, dict(str, str))
:type map_map_of_string: dict[str, dict[str, str]]
"""
self._map_map_of_string = map_map_of_string
@@ -97,7 +97,7 @@ class MapTest(object):
:return: The map_of_enum_string of this MapTest. # noqa: E501
:rtype: dict(str, str)
:rtype: dict[str, str]
"""
return self._map_of_enum_string
@@ -107,7 +107,7 @@ class MapTest(object):
:param map_of_enum_string: The map_of_enum_string of this MapTest. # noqa: E501
:type map_of_enum_string: dict(str, str)
:type map_of_enum_string: dict[str, str]
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
@@ -126,7 +126,7 @@ class MapTest(object):
:return: The direct_map of this MapTest. # noqa: E501
:rtype: dict(str, bool)
:rtype: dict[str, bool]
"""
return self._direct_map
@@ -136,7 +136,7 @@ class MapTest(object):
:param direct_map: The direct_map of this MapTest. # noqa: E501
:type direct_map: dict(str, bool)
:type direct_map: dict[str, bool]
"""
self._direct_map = direct_map
@@ -147,7 +147,7 @@ class MapTest(object):
:return: The indirect_map of this MapTest. # noqa: E501
:rtype: dict(str, bool)
:rtype: dict[str, bool]
"""
return self._indirect_map
@@ -157,7 +157,7 @@ class MapTest(object):
:param indirect_map: The indirect_map of this MapTest. # noqa: E501
:type indirect_map: dict(str, bool)
:type indirect_map: dict[str, bool]
"""
self._indirect_map = indirect_map

View File

@@ -38,7 +38,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
openapi_types = {
'uuid': 'str',
'date_time': 'datetime',
'map': 'dict(str, Animal)'
'map': 'dict[str, Animal]'
}
attribute_map = {
@@ -113,7 +113,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:return: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
:rtype: dict(str, Animal)
:rtype: dict[str, Animal]
"""
return self._map
@@ -123,7 +123,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
:param map: The map of this MixedPropertiesAndAdditionalPropertiesClass. # noqa: E501
:type map: dict(str, Animal)
:type map: dict[str, Animal]
"""
self._map = map