diff --git a/docs/generators/python.md b/docs/generators/python.md
index e0706592cdff..6b0703cc176a 100644
--- a/docs/generators/python.md
+++ b/docs/generators/python.md
@@ -55,7 +55,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
List
UUID
bool
-bytearray
bytes
date
datetime
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
index a1caa703f4d2..924263f217b3 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
@@ -100,13 +100,13 @@ public PythonClientCodegen() {
typeMapping.put("set", "List");
typeMapping.put("map", "Dict");
typeMapping.put("decimal", "decimal.Decimal");
- typeMapping.put("file", "bytearray");
- typeMapping.put("binary", "bytearray");
- typeMapping.put("ByteArray", "bytearray");
+ typeMapping.put("file", "bytes");
+ typeMapping.put("binary", "bytes");
+ typeMapping.put("ByteArray", "bytes");
languageSpecificPrimitives.remove("file");
languageSpecificPrimitives.add("decimal.Decimal");
- languageSpecificPrimitives.add("bytearray");
+ languageSpecificPrimitives.add("bytes");
languageSpecificPrimitives.add("none_type");
supportsInheritance = true;
diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache
index aaa5b267a47d..7af176f139e5 100644
--- a/modules/openapi-generator/src/main/resources/python/api_client.mustache
+++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache
@@ -313,7 +313,7 @@ class ApiClient:
response_text = None
return_data = None
try:
- if response_type == "bytearray":
+ if response_type in ("bytearray", "bytes"):
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/BodyApi.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/BodyApi.md
index d4cc6d4dab6d..86be9cc416c4 100644
--- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/BodyApi.md
+++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/BodyApi.md
@@ -17,7 +17,7 @@ Method | HTTP request | Description
# **test_binary_gif**
-> bytearray test_binary_gif()
+> bytes test_binary_gif()
Test binary (gif) response body
@@ -60,7 +60,7 @@ This endpoint does not need any parameter.
### Return type
-**bytearray**
+**bytes**
### Authorization
@@ -105,7 +105,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.BodyApi(api_client)
- body = None # bytearray | (optional)
+ body = None # bytes | (optional)
try:
# Test body parameter(s)
@@ -123,7 +123,7 @@ with openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **bytearray**| | [optional]
+ **body** | **bytes**| | [optional]
### Return type
@@ -172,7 +172,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.BodyApi(api_client)
- files = None # List[bytearray] |
+ files = None # List[bytes] |
try:
# Test array of binary in multipart mime
@@ -190,7 +190,7 @@ with openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **files** | **List[bytearray]**| |
+ **files** | **List[bytes]**| |
### Return type
@@ -239,7 +239,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.BodyApi(api_client)
- my_file = None # bytearray | (optional)
+ my_file = None # bytes | (optional)
try:
# Test single binary in multipart mime
@@ -257,7 +257,7 @@ with openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **my_file** | **bytearray**| | [optional]
+ **my_file** | **bytes**| | [optional]
### Return type
diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api/body_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api/body_api.py
index 91b6ab12e274..c4b05d54f131 100644
--- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api/body_api.py
+++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api/body_api.py
@@ -56,7 +56,7 @@ def test_binary_gif(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> bytearray:
+ ) -> bytes:
"""Test binary (gif) response body
Test binary (gif) response body
@@ -91,7 +91,7 @@ def test_binary_gif(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -119,7 +119,7 @@ def test_binary_gif_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[bytearray]:
+ ) -> ApiResponse[bytes]:
"""Test binary (gif) response body
Test binary (gif) response body
@@ -154,7 +154,7 @@ def test_binary_gif_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -217,7 +217,7 @@ def test_binary_gif_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -308,7 +308,7 @@ def test_body_application_octetstream_binary(
Test body parameter(s)
:param body:
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -375,7 +375,7 @@ def test_body_application_octetstream_binary_with_http_info(
Test body parameter(s)
:param body:
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -442,7 +442,7 @@ def test_body_application_octetstream_binary_without_preload_content(
Test body parameter(s)
:param body:
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -589,7 +589,7 @@ def test_body_multipart_formdata_array_of_binary(
Test array of binary in multipart mime
:param files: (required)
- :type files: List[bytearray]
+ :type files: List[bytes]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -656,7 +656,7 @@ def test_body_multipart_formdata_array_of_binary_with_http_info(
Test array of binary in multipart mime
:param files: (required)
- :type files: List[bytearray]
+ :type files: List[bytes]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -723,7 +723,7 @@ def test_body_multipart_formdata_array_of_binary_without_preload_content(
Test array of binary in multipart mime
:param files: (required)
- :type files: List[bytearray]
+ :type files: List[bytes]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -863,7 +863,7 @@ def test_body_multipart_formdata_single_binary(
Test single binary in multipart mime
:param my_file:
- :type my_file: bytearray
+ :type my_file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -930,7 +930,7 @@ def test_body_multipart_formdata_single_binary_with_http_info(
Test single binary in multipart mime
:param my_file:
- :type my_file: bytearray
+ :type my_file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -997,7 +997,7 @@ def test_body_multipart_formdata_single_binary_without_preload_content(
Test single binary in multipart mime
:param my_file:
- :type my_file: bytearray
+ :type my_file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py
index c487799e11ab..07c1111e11ef 100644
--- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py
+++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py
@@ -306,7 +306,7 @@ def response_deserialize(
response_text = None
return_data = None
try:
- if response_type == "bytearray":
+ if response_type in ("bytearray", "bytes"):
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
diff --git a/samples/client/echo_api/python/docs/BodyApi.md b/samples/client/echo_api/python/docs/BodyApi.md
index d4cc6d4dab6d..86be9cc416c4 100644
--- a/samples/client/echo_api/python/docs/BodyApi.md
+++ b/samples/client/echo_api/python/docs/BodyApi.md
@@ -17,7 +17,7 @@ Method | HTTP request | Description
# **test_binary_gif**
-> bytearray test_binary_gif()
+> bytes test_binary_gif()
Test binary (gif) response body
@@ -60,7 +60,7 @@ This endpoint does not need any parameter.
### Return type
-**bytearray**
+**bytes**
### Authorization
@@ -105,7 +105,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.BodyApi(api_client)
- body = None # bytearray | (optional)
+ body = None # bytes | (optional)
try:
# Test body parameter(s)
@@ -123,7 +123,7 @@ with openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **bytearray**| | [optional]
+ **body** | **bytes**| | [optional]
### Return type
@@ -172,7 +172,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.BodyApi(api_client)
- files = None # List[bytearray] |
+ files = None # List[bytes] |
try:
# Test array of binary in multipart mime
@@ -190,7 +190,7 @@ with openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **files** | **List[bytearray]**| |
+ **files** | **List[bytes]**| |
### Return type
@@ -239,7 +239,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.BodyApi(api_client)
- my_file = None # bytearray | (optional)
+ my_file = None # bytes | (optional)
try:
# Test single binary in multipart mime
@@ -257,7 +257,7 @@ with openapi_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **my_file** | **bytearray**| | [optional]
+ **my_file** | **bytes**| | [optional]
### Return type
diff --git a/samples/client/echo_api/python/openapi_client/api/body_api.py b/samples/client/echo_api/python/openapi_client/api/body_api.py
index 91b6ab12e274..c4b05d54f131 100644
--- a/samples/client/echo_api/python/openapi_client/api/body_api.py
+++ b/samples/client/echo_api/python/openapi_client/api/body_api.py
@@ -56,7 +56,7 @@ def test_binary_gif(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> bytearray:
+ ) -> bytes:
"""Test binary (gif) response body
Test binary (gif) response body
@@ -91,7 +91,7 @@ def test_binary_gif(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -119,7 +119,7 @@ def test_binary_gif_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[bytearray]:
+ ) -> ApiResponse[bytes]:
"""Test binary (gif) response body
Test binary (gif) response body
@@ -154,7 +154,7 @@ def test_binary_gif_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -217,7 +217,7 @@ def test_binary_gif_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -308,7 +308,7 @@ def test_body_application_octetstream_binary(
Test body parameter(s)
:param body:
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -375,7 +375,7 @@ def test_body_application_octetstream_binary_with_http_info(
Test body parameter(s)
:param body:
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -442,7 +442,7 @@ def test_body_application_octetstream_binary_without_preload_content(
Test body parameter(s)
:param body:
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -589,7 +589,7 @@ def test_body_multipart_formdata_array_of_binary(
Test array of binary in multipart mime
:param files: (required)
- :type files: List[bytearray]
+ :type files: List[bytes]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -656,7 +656,7 @@ def test_body_multipart_formdata_array_of_binary_with_http_info(
Test array of binary in multipart mime
:param files: (required)
- :type files: List[bytearray]
+ :type files: List[bytes]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -723,7 +723,7 @@ def test_body_multipart_formdata_array_of_binary_without_preload_content(
Test array of binary in multipart mime
:param files: (required)
- :type files: List[bytearray]
+ :type files: List[bytes]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -863,7 +863,7 @@ def test_body_multipart_formdata_single_binary(
Test single binary in multipart mime
:param my_file:
- :type my_file: bytearray
+ :type my_file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -930,7 +930,7 @@ def test_body_multipart_formdata_single_binary_with_http_info(
Test single binary in multipart mime
:param my_file:
- :type my_file: bytearray
+ :type my_file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -997,7 +997,7 @@ def test_body_multipart_formdata_single_binary_without_preload_content(
Test single binary in multipart mime
:param my_file:
- :type my_file: bytearray
+ :type my_file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
diff --git a/samples/client/echo_api/python/openapi_client/api_client.py b/samples/client/echo_api/python/openapi_client/api_client.py
index c487799e11ab..07c1111e11ef 100644
--- a/samples/client/echo_api/python/openapi_client/api_client.py
+++ b/samples/client/echo_api/python/openapi_client/api_client.py
@@ -306,7 +306,7 @@ def response_deserialize(
response_text = None
return_data = None
try:
- if response_type == "bytearray":
+ if response_type in ("bytearray", "bytes"):
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md
index 843b8f246632..8f79394afc28 100644
--- a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md
+++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md
@@ -816,7 +816,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)
# **fake_return_byte_like_json**
-> bytearray fake_return_byte_like_json()
+> bytes fake_return_byte_like_json()
test byte like json
@@ -857,7 +857,7 @@ This endpoint does not need any parameter.
### Return type
-**bytearray**
+**bytes**
### Authorization
@@ -1456,7 +1456,7 @@ configuration = petstore_api.Configuration(
async with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- body = None # bytearray | image to upload
+ body = None # bytes | image to upload
try:
await api_instance.test_body_with_binary(body)
@@ -1471,7 +1471,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **bytearray**| image to upload |
+ **body** | **bytes**| image to upload |
### Return type
@@ -1856,14 +1856,14 @@ async with petstore_api.ApiClient(configuration) as api_client:
number = 3.4 # float | None
double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
- byte = None # bytearray | None
+ byte = None # bytes | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
int64 = 56 # int | None (optional)
var_float = 3.4 # float | None (optional)
string = 'string_example' # str | None (optional)
- binary = None # bytearray | None (optional)
- byte_with_max_length = None # bytearray | None (optional)
+ binary = None # bytes | None (optional)
+ byte_with_max_length = None # bytes | None (optional)
var_date = '2013-10-20' # date | None (optional)
date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
password = 'password_example' # str | None (optional)
@@ -1886,14 +1886,14 @@ Name | Type | Description | Notes
**number** | **float**| None |
**double** | **float**| None |
**pattern_without_delimiter** | **str**| None |
- **byte** | **bytearray**| None |
+ **byte** | **bytes**| None |
**integer** | **int**| None | [optional]
**int32** | **int**| None | [optional]
**int64** | **int**| None | [optional]
**var_float** | **float**| None | [optional]
**string** | **str**| None | [optional]
- **binary** | **bytearray**| None | [optional]
- **byte_with_max_length** | **bytearray**| None | [optional]
+ **binary** | **bytes**| None | [optional]
+ **byte_with_max_length** | **bytes**| None | [optional]
**var_date** | **date**| None | [optional]
**date_time** | **datetime**| None | [optional]
**password** | **str**| None | [optional]
@@ -2493,7 +2493,7 @@ configuration = petstore_api.Configuration(
async with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- file = None # bytearray | file to upload
+ file = None # bytes | file to upload
object = petstore_api.UploadFileWithAdditionalPropertiesRequestObject() # UploadFileWithAdditionalPropertiesRequestObject | (optional)
count = 56 # int | Integer count (optional)
@@ -2513,7 +2513,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **file** | **bytearray**| file to upload |
+ **file** | **bytes**| file to upload |
**object** | [**UploadFileWithAdditionalPropertiesRequestObject**](UploadFileWithAdditionalPropertiesRequestObject.md)| | [optional]
**count** | **int**| Integer count | [optional]
diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md
index 714d2401bbae..a09306571ea7 100644
--- a/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FormatTest.md
@@ -14,8 +14,8 @@ Name | Type | Description | Notes
**decimal** | **decimal.Decimal** | | [optional]
**string** | **str** | | [optional]
**string_with_double_quote_pattern** | **str** | | [optional]
-**byte** | **bytearray** | | [optional]
-**binary** | **bytearray** | | [optional]
+**byte** | **bytes** | | [optional]
+**binary** | **bytes** | | [optional]
**var_date** | **date** | |
**date_time** | **datetime** | | [optional]
**uuid** | **UUID** | | [optional]
diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/PetApi.md b/samples/openapi3/client/petstore/python-aiohttp/docs/PetApi.md
index 5c94968b7caf..4dda39306a29 100644
--- a/samples/openapi3/client/petstore/python-aiohttp/docs/PetApi.md
+++ b/samples/openapi3/client/petstore/python-aiohttp/docs/PetApi.md
@@ -838,7 +838,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
- file = None # bytearray | file to upload (optional)
+ file = None # bytes | file to upload (optional)
try:
# uploads an image
@@ -858,7 +858,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
- **file** | **bytearray**| file to upload | [optional]
+ **file** | **bytes**| file to upload | [optional]
### Return type
@@ -916,7 +916,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
- required_file = None # bytearray | file to upload
+ required_file = None # bytes | file to upload
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
try:
@@ -936,7 +936,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
- **required_file** | **bytearray**| file to upload |
+ **required_file** | **bytes**| file to upload |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
### Return type
diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py
index 417b4e146998..9e895f7806ee 100644
--- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py
+++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py
@@ -2989,7 +2989,7 @@ async def fake_return_byte_like_json(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> bytearray:
+ ) -> bytes:
"""test byte like json
@@ -3023,7 +3023,7 @@ async def fake_return_byte_like_json(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = await self.api_client.call_api(
*_param,
@@ -3051,7 +3051,7 @@ async def fake_return_byte_like_json_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[bytearray]:
+ ) -> ApiResponse[bytes]:
"""test byte like json
@@ -3085,7 +3085,7 @@ async def fake_return_byte_like_json_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = await self.api_client.call_api(
*_param,
@@ -3147,7 +3147,7 @@ async def fake_return_byte_like_json_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = await self.api_client.call_api(
*_param,
@@ -5450,7 +5450,7 @@ async def test_body_with_binary(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5517,7 +5517,7 @@ async def test_body_with_binary_with_http_info(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5584,7 +5584,7 @@ async def test_body_with_binary_without_preload_content(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -7089,7 +7089,7 @@ async def test_endpoint_parameters(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7101,9 +7101,9 @@ async def test_endpoint_parameters(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7213,7 +7213,7 @@ async def test_endpoint_parameters_with_http_info(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7225,9 +7225,9 @@ async def test_endpoint_parameters_with_http_info(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7337,7 +7337,7 @@ async def test_endpoint_parameters_without_preload_content(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7349,9 +7349,9 @@ async def test_endpoint_parameters_without_preload_content(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -9840,7 +9840,7 @@ async def upload_file_with_additional_properties(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9915,7 +9915,7 @@ async def upload_file_with_additional_properties_with_http_info(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9990,7 +9990,7 @@ async def upload_file_with_additional_properties_without_preload_content(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py
index 9cfd451aa381..5da83f4a686a 100644
--- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py
+++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py
@@ -1998,7 +1998,7 @@ async def upload_file(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2073,7 +2073,7 @@ async def upload_file_with_http_info(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2148,7 +2148,7 @@ async def upload_file_without_preload_content(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2300,7 +2300,7 @@ async def upload_file_with_required_file(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2375,7 +2375,7 @@ async def upload_file_with_required_file_with_http_info(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2450,7 +2450,7 @@ async def upload_file_with_required_file_without_preload_content(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py
index 15264546c88f..2aee604aba95 100644
--- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py
+++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py
@@ -308,7 +308,7 @@ def response_deserialize(
response_text = None
return_data = None
try:
- if response_type == "bytearray":
+ if response_type in ("bytearray", "bytes"):
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
diff --git a/samples/openapi3/client/petstore/python-httpx/docs/FakeApi.md b/samples/openapi3/client/petstore/python-httpx/docs/FakeApi.md
index 843b8f246632..8f79394afc28 100644
--- a/samples/openapi3/client/petstore/python-httpx/docs/FakeApi.md
+++ b/samples/openapi3/client/petstore/python-httpx/docs/FakeApi.md
@@ -816,7 +816,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)
# **fake_return_byte_like_json**
-> bytearray fake_return_byte_like_json()
+> bytes fake_return_byte_like_json()
test byte like json
@@ -857,7 +857,7 @@ This endpoint does not need any parameter.
### Return type
-**bytearray**
+**bytes**
### Authorization
@@ -1456,7 +1456,7 @@ configuration = petstore_api.Configuration(
async with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- body = None # bytearray | image to upload
+ body = None # bytes | image to upload
try:
await api_instance.test_body_with_binary(body)
@@ -1471,7 +1471,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **bytearray**| image to upload |
+ **body** | **bytes**| image to upload |
### Return type
@@ -1856,14 +1856,14 @@ async with petstore_api.ApiClient(configuration) as api_client:
number = 3.4 # float | None
double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
- byte = None # bytearray | None
+ byte = None # bytes | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
int64 = 56 # int | None (optional)
var_float = 3.4 # float | None (optional)
string = 'string_example' # str | None (optional)
- binary = None # bytearray | None (optional)
- byte_with_max_length = None # bytearray | None (optional)
+ binary = None # bytes | None (optional)
+ byte_with_max_length = None # bytes | None (optional)
var_date = '2013-10-20' # date | None (optional)
date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
password = 'password_example' # str | None (optional)
@@ -1886,14 +1886,14 @@ Name | Type | Description | Notes
**number** | **float**| None |
**double** | **float**| None |
**pattern_without_delimiter** | **str**| None |
- **byte** | **bytearray**| None |
+ **byte** | **bytes**| None |
**integer** | **int**| None | [optional]
**int32** | **int**| None | [optional]
**int64** | **int**| None | [optional]
**var_float** | **float**| None | [optional]
**string** | **str**| None | [optional]
- **binary** | **bytearray**| None | [optional]
- **byte_with_max_length** | **bytearray**| None | [optional]
+ **binary** | **bytes**| None | [optional]
+ **byte_with_max_length** | **bytes**| None | [optional]
**var_date** | **date**| None | [optional]
**date_time** | **datetime**| None | [optional]
**password** | **str**| None | [optional]
@@ -2493,7 +2493,7 @@ configuration = petstore_api.Configuration(
async with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- file = None # bytearray | file to upload
+ file = None # bytes | file to upload
object = petstore_api.UploadFileWithAdditionalPropertiesRequestObject() # UploadFileWithAdditionalPropertiesRequestObject | (optional)
count = 56 # int | Integer count (optional)
@@ -2513,7 +2513,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **file** | **bytearray**| file to upload |
+ **file** | **bytes**| file to upload |
**object** | [**UploadFileWithAdditionalPropertiesRequestObject**](UploadFileWithAdditionalPropertiesRequestObject.md)| | [optional]
**count** | **int**| Integer count | [optional]
diff --git a/samples/openapi3/client/petstore/python-httpx/docs/FormatTest.md b/samples/openapi3/client/petstore/python-httpx/docs/FormatTest.md
index 714d2401bbae..a09306571ea7 100644
--- a/samples/openapi3/client/petstore/python-httpx/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/python-httpx/docs/FormatTest.md
@@ -14,8 +14,8 @@ Name | Type | Description | Notes
**decimal** | **decimal.Decimal** | | [optional]
**string** | **str** | | [optional]
**string_with_double_quote_pattern** | **str** | | [optional]
-**byte** | **bytearray** | | [optional]
-**binary** | **bytearray** | | [optional]
+**byte** | **bytes** | | [optional]
+**binary** | **bytes** | | [optional]
**var_date** | **date** | |
**date_time** | **datetime** | | [optional]
**uuid** | **UUID** | | [optional]
diff --git a/samples/openapi3/client/petstore/python-httpx/docs/PetApi.md b/samples/openapi3/client/petstore/python-httpx/docs/PetApi.md
index 5c94968b7caf..4dda39306a29 100644
--- a/samples/openapi3/client/petstore/python-httpx/docs/PetApi.md
+++ b/samples/openapi3/client/petstore/python-httpx/docs/PetApi.md
@@ -838,7 +838,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
- file = None # bytearray | file to upload (optional)
+ file = None # bytes | file to upload (optional)
try:
# uploads an image
@@ -858,7 +858,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
- **file** | **bytearray**| file to upload | [optional]
+ **file** | **bytes**| file to upload | [optional]
### Return type
@@ -916,7 +916,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
- required_file = None # bytearray | file to upload
+ required_file = None # bytes | file to upload
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
try:
@@ -936,7 +936,7 @@ async with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
- **required_file** | **bytearray**| file to upload |
+ **required_file** | **bytes**| file to upload |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
### Return type
diff --git a/samples/openapi3/client/petstore/python-httpx/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-httpx/petstore_api/api/fake_api.py
index 417b4e146998..9e895f7806ee 100644
--- a/samples/openapi3/client/petstore/python-httpx/petstore_api/api/fake_api.py
+++ b/samples/openapi3/client/petstore/python-httpx/petstore_api/api/fake_api.py
@@ -2989,7 +2989,7 @@ async def fake_return_byte_like_json(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> bytearray:
+ ) -> bytes:
"""test byte like json
@@ -3023,7 +3023,7 @@ async def fake_return_byte_like_json(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = await self.api_client.call_api(
*_param,
@@ -3051,7 +3051,7 @@ async def fake_return_byte_like_json_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[bytearray]:
+ ) -> ApiResponse[bytes]:
"""test byte like json
@@ -3085,7 +3085,7 @@ async def fake_return_byte_like_json_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = await self.api_client.call_api(
*_param,
@@ -3147,7 +3147,7 @@ async def fake_return_byte_like_json_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = await self.api_client.call_api(
*_param,
@@ -5450,7 +5450,7 @@ async def test_body_with_binary(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5517,7 +5517,7 @@ async def test_body_with_binary_with_http_info(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5584,7 +5584,7 @@ async def test_body_with_binary_without_preload_content(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -7089,7 +7089,7 @@ async def test_endpoint_parameters(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7101,9 +7101,9 @@ async def test_endpoint_parameters(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7213,7 +7213,7 @@ async def test_endpoint_parameters_with_http_info(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7225,9 +7225,9 @@ async def test_endpoint_parameters_with_http_info(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7337,7 +7337,7 @@ async def test_endpoint_parameters_without_preload_content(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7349,9 +7349,9 @@ async def test_endpoint_parameters_without_preload_content(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -9840,7 +9840,7 @@ async def upload_file_with_additional_properties(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9915,7 +9915,7 @@ async def upload_file_with_additional_properties_with_http_info(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9990,7 +9990,7 @@ async def upload_file_with_additional_properties_without_preload_content(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
diff --git a/samples/openapi3/client/petstore/python-httpx/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-httpx/petstore_api/api/pet_api.py
index 9cfd451aa381..5da83f4a686a 100644
--- a/samples/openapi3/client/petstore/python-httpx/petstore_api/api/pet_api.py
+++ b/samples/openapi3/client/petstore/python-httpx/petstore_api/api/pet_api.py
@@ -1998,7 +1998,7 @@ async def upload_file(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2073,7 +2073,7 @@ async def upload_file_with_http_info(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2148,7 +2148,7 @@ async def upload_file_without_preload_content(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2300,7 +2300,7 @@ async def upload_file_with_required_file(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2375,7 +2375,7 @@ async def upload_file_with_required_file_with_http_info(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2450,7 +2450,7 @@ async def upload_file_with_required_file_without_preload_content(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
diff --git a/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py
index 15264546c88f..2aee604aba95 100644
--- a/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py
+++ b/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py
@@ -308,7 +308,7 @@ def response_deserialize(
response_text = None
return_data = None
try:
- if response_type == "bytearray":
+ if response_type in ("bytearray", "bytes"):
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
diff --git a/samples/openapi3/client/petstore/python-lazyImports/docs/FakeApi.md b/samples/openapi3/client/petstore/python-lazyImports/docs/FakeApi.md
index 8adef01f88e6..7ef2af8af2c3 100644
--- a/samples/openapi3/client/petstore/python-lazyImports/docs/FakeApi.md
+++ b/samples/openapi3/client/petstore/python-lazyImports/docs/FakeApi.md
@@ -816,7 +816,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)
# **fake_return_byte_like_json**
-> bytearray fake_return_byte_like_json()
+> bytes fake_return_byte_like_json()
test byte like json
@@ -857,7 +857,7 @@ This endpoint does not need any parameter.
### Return type
-**bytearray**
+**bytes**
### Authorization
@@ -1456,7 +1456,7 @@ configuration = petstore_api.Configuration(
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- body = None # bytearray | image to upload
+ body = None # bytes | image to upload
try:
api_instance.test_body_with_binary(body)
@@ -1471,7 +1471,7 @@ with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **bytearray**| image to upload |
+ **body** | **bytes**| image to upload |
### Return type
@@ -1856,14 +1856,14 @@ with petstore_api.ApiClient(configuration) as api_client:
number = 3.4 # float | None
double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
- byte = None # bytearray | None
+ byte = None # bytes | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
int64 = 56 # int | None (optional)
var_float = 3.4 # float | None (optional)
string = 'string_example' # str | None (optional)
- binary = None # bytearray | None (optional)
- byte_with_max_length = None # bytearray | None (optional)
+ binary = None # bytes | None (optional)
+ byte_with_max_length = None # bytes | None (optional)
var_date = '2013-10-20' # date | None (optional)
date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
password = 'password_example' # str | None (optional)
@@ -1886,14 +1886,14 @@ Name | Type | Description | Notes
**number** | **float**| None |
**double** | **float**| None |
**pattern_without_delimiter** | **str**| None |
- **byte** | **bytearray**| None |
+ **byte** | **bytes**| None |
**integer** | **int**| None | [optional]
**int32** | **int**| None | [optional]
**int64** | **int**| None | [optional]
**var_float** | **float**| None | [optional]
**string** | **str**| None | [optional]
- **binary** | **bytearray**| None | [optional]
- **byte_with_max_length** | **bytearray**| None | [optional]
+ **binary** | **bytes**| None | [optional]
+ **byte_with_max_length** | **bytes**| None | [optional]
**var_date** | **date**| None | [optional]
**date_time** | **datetime**| None | [optional]
**password** | **str**| None | [optional]
@@ -2493,7 +2493,7 @@ configuration = petstore_api.Configuration(
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- file = None # bytearray | file to upload
+ file = None # bytes | file to upload
object = petstore_api.UploadFileWithAdditionalPropertiesRequestObject() # UploadFileWithAdditionalPropertiesRequestObject | (optional)
count = 56 # int | Integer count (optional)
@@ -2513,7 +2513,7 @@ with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **file** | **bytearray**| file to upload |
+ **file** | **bytes**| file to upload |
**object** | [**UploadFileWithAdditionalPropertiesRequestObject**](UploadFileWithAdditionalPropertiesRequestObject.md)| | [optional]
**count** | **int**| Integer count | [optional]
diff --git a/samples/openapi3/client/petstore/python-lazyImports/docs/FormatTest.md b/samples/openapi3/client/petstore/python-lazyImports/docs/FormatTest.md
index 714d2401bbae..a09306571ea7 100644
--- a/samples/openapi3/client/petstore/python-lazyImports/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/python-lazyImports/docs/FormatTest.md
@@ -14,8 +14,8 @@ Name | Type | Description | Notes
**decimal** | **decimal.Decimal** | | [optional]
**string** | **str** | | [optional]
**string_with_double_quote_pattern** | **str** | | [optional]
-**byte** | **bytearray** | | [optional]
-**binary** | **bytearray** | | [optional]
+**byte** | **bytes** | | [optional]
+**binary** | **bytes** | | [optional]
**var_date** | **date** | |
**date_time** | **datetime** | | [optional]
**uuid** | **UUID** | | [optional]
diff --git a/samples/openapi3/client/petstore/python-lazyImports/docs/PetApi.md b/samples/openapi3/client/petstore/python-lazyImports/docs/PetApi.md
index 05c547865afd..3396f1974f91 100644
--- a/samples/openapi3/client/petstore/python-lazyImports/docs/PetApi.md
+++ b/samples/openapi3/client/petstore/python-lazyImports/docs/PetApi.md
@@ -838,7 +838,7 @@ with petstore_api.ApiClient(configuration) as api_client:
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
- file = None # bytearray | file to upload (optional)
+ file = None # bytes | file to upload (optional)
try:
# uploads an image
@@ -858,7 +858,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
- **file** | **bytearray**| file to upload | [optional]
+ **file** | **bytes**| file to upload | [optional]
### Return type
@@ -916,7 +916,7 @@ with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
- required_file = None # bytearray | file to upload
+ required_file = None # bytes | file to upload
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
try:
@@ -936,7 +936,7 @@ with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
- **required_file** | **bytearray**| file to upload |
+ **required_file** | **bytes**| file to upload |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
### Return type
diff --git a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/fake_api.py
index d44be0fb2913..2373d1680c58 100644
--- a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/fake_api.py
+++ b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/fake_api.py
@@ -2989,7 +2989,7 @@ def fake_return_byte_like_json(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> bytearray:
+ ) -> bytes:
"""test byte like json
@@ -3023,7 +3023,7 @@ def fake_return_byte_like_json(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -3051,7 +3051,7 @@ def fake_return_byte_like_json_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[bytearray]:
+ ) -> ApiResponse[bytes]:
"""test byte like json
@@ -3085,7 +3085,7 @@ def fake_return_byte_like_json_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -3147,7 +3147,7 @@ def fake_return_byte_like_json_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -5450,7 +5450,7 @@ def test_body_with_binary(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5517,7 +5517,7 @@ def test_body_with_binary_with_http_info(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5584,7 +5584,7 @@ def test_body_with_binary_without_preload_content(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -7089,7 +7089,7 @@ def test_endpoint_parameters(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7101,9 +7101,9 @@ def test_endpoint_parameters(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7213,7 +7213,7 @@ def test_endpoint_parameters_with_http_info(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7225,9 +7225,9 @@ def test_endpoint_parameters_with_http_info(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7337,7 +7337,7 @@ def test_endpoint_parameters_without_preload_content(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7349,9 +7349,9 @@ def test_endpoint_parameters_without_preload_content(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -9840,7 +9840,7 @@ def upload_file_with_additional_properties(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9915,7 +9915,7 @@ def upload_file_with_additional_properties_with_http_info(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9990,7 +9990,7 @@ def upload_file_with_additional_properties_without_preload_content(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
diff --git a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/pet_api.py
index 563c7a071c82..7d4cf604eb15 100644
--- a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/pet_api.py
+++ b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api/pet_api.py
@@ -1998,7 +1998,7 @@ def upload_file(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2073,7 +2073,7 @@ def upload_file_with_http_info(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2148,7 +2148,7 @@ def upload_file_without_preload_content(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2300,7 +2300,7 @@ def upload_file_with_required_file(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2375,7 +2375,7 @@ def upload_file_with_required_file_with_http_info(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2450,7 +2450,7 @@ def upload_file_with_required_file_without_preload_content(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
diff --git a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py
index c777965854a9..253d481d3d44 100644
--- a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py
+++ b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py
@@ -305,7 +305,7 @@ def response_deserialize(
response_text = None
return_data = None
try:
- if response_type == "bytearray":
+ if response_type in ("bytearray", "bytes"):
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md
index 8adef01f88e6..7ef2af8af2c3 100644
--- a/samples/openapi3/client/petstore/python/docs/FakeApi.md
+++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md
@@ -816,7 +816,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)
# **fake_return_byte_like_json**
-> bytearray fake_return_byte_like_json()
+> bytes fake_return_byte_like_json()
test byte like json
@@ -857,7 +857,7 @@ This endpoint does not need any parameter.
### Return type
-**bytearray**
+**bytes**
### Authorization
@@ -1456,7 +1456,7 @@ configuration = petstore_api.Configuration(
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- body = None # bytearray | image to upload
+ body = None # bytes | image to upload
try:
api_instance.test_body_with_binary(body)
@@ -1471,7 +1471,7 @@ with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | **bytearray**| image to upload |
+ **body** | **bytes**| image to upload |
### Return type
@@ -1856,14 +1856,14 @@ with petstore_api.ApiClient(configuration) as api_client:
number = 3.4 # float | None
double = 3.4 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
- byte = None # bytearray | None
+ byte = None # bytes | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
int64 = 56 # int | None (optional)
var_float = 3.4 # float | None (optional)
string = 'string_example' # str | None (optional)
- binary = None # bytearray | None (optional)
- byte_with_max_length = None # bytearray | None (optional)
+ binary = None # bytes | None (optional)
+ byte_with_max_length = None # bytes | None (optional)
var_date = '2013-10-20' # date | None (optional)
date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
password = 'password_example' # str | None (optional)
@@ -1886,14 +1886,14 @@ Name | Type | Description | Notes
**number** | **float**| None |
**double** | **float**| None |
**pattern_without_delimiter** | **str**| None |
- **byte** | **bytearray**| None |
+ **byte** | **bytes**| None |
**integer** | **int**| None | [optional]
**int32** | **int**| None | [optional]
**int64** | **int**| None | [optional]
**var_float** | **float**| None | [optional]
**string** | **str**| None | [optional]
- **binary** | **bytearray**| None | [optional]
- **byte_with_max_length** | **bytearray**| None | [optional]
+ **binary** | **bytes**| None | [optional]
+ **byte_with_max_length** | **bytes**| None | [optional]
**var_date** | **date**| None | [optional]
**date_time** | **datetime**| None | [optional]
**password** | **str**| None | [optional]
@@ -2493,7 +2493,7 @@ configuration = petstore_api.Configuration(
with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.FakeApi(api_client)
- file = None # bytearray | file to upload
+ file = None # bytes | file to upload
object = petstore_api.UploadFileWithAdditionalPropertiesRequestObject() # UploadFileWithAdditionalPropertiesRequestObject | (optional)
count = 56 # int | Integer count (optional)
@@ -2513,7 +2513,7 @@ with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **file** | **bytearray**| file to upload |
+ **file** | **bytes**| file to upload |
**object** | [**UploadFileWithAdditionalPropertiesRequestObject**](UploadFileWithAdditionalPropertiesRequestObject.md)| | [optional]
**count** | **int**| Integer count | [optional]
diff --git a/samples/openapi3/client/petstore/python/docs/FormatTest.md b/samples/openapi3/client/petstore/python/docs/FormatTest.md
index 714d2401bbae..a09306571ea7 100644
--- a/samples/openapi3/client/petstore/python/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/python/docs/FormatTest.md
@@ -14,8 +14,8 @@ Name | Type | Description | Notes
**decimal** | **decimal.Decimal** | | [optional]
**string** | **str** | | [optional]
**string_with_double_quote_pattern** | **str** | | [optional]
-**byte** | **bytearray** | | [optional]
-**binary** | **bytearray** | | [optional]
+**byte** | **bytes** | | [optional]
+**binary** | **bytes** | | [optional]
**var_date** | **date** | |
**date_time** | **datetime** | | [optional]
**uuid** | **UUID** | | [optional]
diff --git a/samples/openapi3/client/petstore/python/docs/PetApi.md b/samples/openapi3/client/petstore/python/docs/PetApi.md
index 05c547865afd..3396f1974f91 100644
--- a/samples/openapi3/client/petstore/python/docs/PetApi.md
+++ b/samples/openapi3/client/petstore/python/docs/PetApi.md
@@ -838,7 +838,7 @@ with petstore_api.ApiClient(configuration) as api_client:
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
- file = None # bytearray | file to upload (optional)
+ file = None # bytes | file to upload (optional)
try:
# uploads an image
@@ -858,7 +858,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
- **file** | **bytearray**| file to upload | [optional]
+ **file** | **bytes**| file to upload | [optional]
### Return type
@@ -916,7 +916,7 @@ with petstore_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = petstore_api.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
- required_file = None # bytearray | file to upload
+ required_file = None # bytes | file to upload
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
try:
@@ -936,7 +936,7 @@ with petstore_api.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
- **required_file** | **bytearray**| file to upload |
+ **required_file** | **bytes**| file to upload |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
### Return type
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py
index d44be0fb2913..2373d1680c58 100755
--- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py
@@ -2989,7 +2989,7 @@ def fake_return_byte_like_json(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> bytearray:
+ ) -> bytes:
"""test byte like json
@@ -3023,7 +3023,7 @@ def fake_return_byte_like_json(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -3051,7 +3051,7 @@ def fake_return_byte_like_json_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[bytearray]:
+ ) -> ApiResponse[bytes]:
"""test byte like json
@@ -3085,7 +3085,7 @@ def fake_return_byte_like_json_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -3147,7 +3147,7 @@ def fake_return_byte_like_json_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "bytearray",
+ '200': "bytes",
}
response_data = self.api_client.call_api(
*_param,
@@ -5450,7 +5450,7 @@ def test_body_with_binary(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5517,7 +5517,7 @@ def test_body_with_binary_with_http_info(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -5584,7 +5584,7 @@ def test_body_with_binary_without_preload_content(
For this test, the body has to be a binary file.
:param body: image to upload (required)
- :type body: bytearray
+ :type body: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -7089,7 +7089,7 @@ def test_endpoint_parameters(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7101,9 +7101,9 @@ def test_endpoint_parameters(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7213,7 +7213,7 @@ def test_endpoint_parameters_with_http_info(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7225,9 +7225,9 @@ def test_endpoint_parameters_with_http_info(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -7337,7 +7337,7 @@ def test_endpoint_parameters_without_preload_content(
:param pattern_without_delimiter: None (required)
:type pattern_without_delimiter: str
:param byte: None (required)
- :type byte: bytearray
+ :type byte: bytes
:param integer: None
:type integer: int
:param int32: None
@@ -7349,9 +7349,9 @@ def test_endpoint_parameters_without_preload_content(
:param string: None
:type string: str
:param binary: None
- :type binary: bytearray
+ :type binary: bytes
:param byte_with_max_length: None
- :type byte_with_max_length: bytearray
+ :type byte_with_max_length: bytes
:param var_date: None
:type var_date: date
:param date_time: None
@@ -9840,7 +9840,7 @@ def upload_file_with_additional_properties(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9915,7 +9915,7 @@ def upload_file_with_additional_properties_with_http_info(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
@@ -9990,7 +9990,7 @@ def upload_file_with_additional_properties_without_preload_content(
:param file: file to upload (required)
- :type file: bytearray
+ :type file: bytes
:param object:
:type object: UploadFileWithAdditionalPropertiesRequestObject
:param count: Integer count
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py
index 563c7a071c82..7d4cf604eb15 100755
--- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py
@@ -1998,7 +1998,7 @@ def upload_file(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2073,7 +2073,7 @@ def upload_file_with_http_info(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2148,7 +2148,7 @@ def upload_file_without_preload_content(
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param file: file to upload
- :type file: bytearray
+ :type file: bytes
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -2300,7 +2300,7 @@ def upload_file_with_required_file(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2375,7 +2375,7 @@ def upload_file_with_required_file_with_http_info(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
@@ -2450,7 +2450,7 @@ def upload_file_with_required_file_without_preload_content(
:param pet_id: ID of pet to update (required)
:type pet_id: int
:param required_file: file to upload (required)
- :type required_file: bytearray
+ :type required_file: bytes
:param additional_metadata: Additional data to pass to server
:type additional_metadata: str
:param _request_timeout: timeout setting for this request. If one
diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py
index c777965854a9..253d481d3d44 100755
--- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py
@@ -305,7 +305,7 @@ def response_deserialize(
response_text = None
return_data = None
try:
- if response_type == "bytearray":
+ if response_type in ("bytearray", "bytes"):
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)