Python client - fixes boolean enum use case (#9926)

* Adds boolean enum component and object property and tests of it

* Regenerates samples

* Passes needed locale argument to toUpperCase

* Regenerates samples
This commit is contained in:
Justin Black
2021-07-09 21:55:22 -04:00
committed by GitHub
parent 02835b35bc
commit 11515da053
13 changed files with 416 additions and 5 deletions

View File

@@ -0,0 +1,12 @@
# BooleanEnum
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **bool** | | defaults to True, must be one of [True, ]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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

@@ -8,6 +8,8 @@ Name | Type | Description | Notes
**enum_string** | **str** | | [optional]
**enum_integer** | **int** | | [optional]
**enum_number** | **float** | | [optional]
**enum_bool** | **bool** | | [optional] if omitted the server will use the default value of False
**bool_enum** | [**BooleanEnum**](BooleanEnum.md) | | [optional]
**string_enum** | [**StringEnum**](StringEnum.md) | | [optional]
**integer_enum** | [**IntegerEnum**](IntegerEnum.md) | | [optional]
**string_enum_with_default_value** | [**StringEnumWithDefaultValue**](StringEnumWithDefaultValue.md) | | [optional]

View File

@@ -454,6 +454,8 @@ with petstore_api.ApiClient() as api_client:
enum_string_required="UPPER",
enum_integer=1,
enum_number=1.1,
enum_bool=False,
bool_enum=BooleanEnum(True),
string_enum=StringEnum("placed"),
integer_enum=IntegerEnum(0),
string_enum_with_default_value=StringEnumWithDefaultValue("placed"),