mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 08:06:12 +00:00
Add enum default value tests to python clients (#18883)
* add enum default value tests to python clients * add new files
This commit is contained in:
16
samples/openapi3/client/petstore/python/docs/TestEnum.md
Normal file
16
samples/openapi3/client/petstore/python/docs/TestEnum.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# TestEnum
|
||||
|
||||
|
||||
## Enum
|
||||
|
||||
* `ONE` (value: `'ONE'`)
|
||||
|
||||
* `TWO` (value: `'TWO'`)
|
||||
|
||||
* `THREE` (value: `'THREE'`)
|
||||
|
||||
* `FOUR` (value: `'foUr'`)
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# TestEnumWithDefault
|
||||
|
||||
|
||||
## Enum
|
||||
|
||||
* `EIN` (value: `'EIN'`)
|
||||
|
||||
* `ZWEI` (value: `'ZWEI'`)
|
||||
|
||||
* `DREI` (value: `'DREI'`)
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# TestModelWithEnumDefault
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**test_enum** | [**TestEnum**](TestEnum.md) | |
|
||||
**test_string** | **str** | | [optional]
|
||||
**test_enum_with_default** | [**TestEnumWithDefault**](TestEnumWithDefault.md) | | [optional] [default to TestEnumWithDefault.ZWEI]
|
||||
**test_string_with_default** | **str** | | [optional] [default to 'ahoy matey']
|
||||
**test_inline_defined_enum_with_default** | **str** | | [optional] [default to 'B']
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.test_model_with_enum_default import TestModelWithEnumDefault
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of TestModelWithEnumDefault from a JSON string
|
||||
test_model_with_enum_default_instance = TestModelWithEnumDefault.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(TestModelWithEnumDefault.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
test_model_with_enum_default_dict = test_model_with_enum_default_instance.to_dict()
|
||||
# create an instance of TestModelWithEnumDefault from a dict
|
||||
test_model_with_enum_default_from_dict = TestModelWithEnumDefault.from_dict(test_model_with_enum_default_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user