mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 00:56:09 +00:00
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:
12
samples/openapi3/client/petstore/python/docs/BooleanEnum.md
Normal file
12
samples/openapi3/client/petstore/python/docs/BooleanEnum.md
Normal 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)
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user