[Python] List enum members in docs (#18804)

* List enum values in docs

* Remove newline

* Remove another newline

* Generate samples
This commit is contained in:
Lars van Leeuwen
2024-06-01 11:00:11 +02:00
committed by GitHub
parent e2258fb790
commit 8783ad8a18
42 changed files with 314 additions and 120 deletions

View File

@@ -3,6 +3,7 @@
{{#description}}{{&description}}
{{/description}}
{{^isEnum}}
## Properties
Name | Type | Description | Notes
@@ -10,7 +11,6 @@ Name | Type | Description | Notes
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
{{^isEnum}}
## Example
```python
@@ -29,6 +29,12 @@ print {{classname}}.to_json()
{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict)
```
{{/isEnum}}
{{#isEnum}}
## Enum
{{#allowableValues}}{{#enumVars}}
* `{{name}}` (value: `{{{value}}}`)
{{/enumVars}}{{/allowableValues}}
{{/isEnum}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}}{{/models}}

View File

@@ -3,13 +3,13 @@
{{#description}}{{&description}}
{{/description}}
{{^isEnum}}
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
{{^isEnum}}
## Example
```python
@@ -28,6 +28,12 @@ print {{classname}}.to_json()
{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict)
```
{{/isEnum}}
{{#isEnum}}
## Enum
{{#allowableValues}}{{#enumVars}}
* `{{name}}` (value: `{{{value}}}`)
{{/enumVars}}{{/allowableValues}}
{{/isEnum}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}}{{/models}}

View File

@@ -3,6 +3,7 @@
{{#description}}{{&description}}
{{/description}}
{{^isEnum}}
## Properties
Name | Type | Description | Notes
@@ -10,7 +11,6 @@ Name | Type | Description | Notes
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
{{^isEnum}}
## Example
```python
@@ -29,6 +29,12 @@ print({{classname}}.to_json())
{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict)
```
{{/isEnum}}
{{#isEnum}}
## Enum
{{#allowableValues}}{{#enumVars}}
* `{{name}}` (value: `{{{value}}}`)
{{/enumVars}}{{/allowableValues}}
{{/isEnum}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}}{{/models}}

View File

@@ -1,10 +1,13 @@
# StringEnumRef
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `SUCCESS` (value: `'success'`)
* `FAILURE` (value: `'failure'`)
* `UNCLASSIFIED` (value: `'unclassified'`)
[[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

@@ -1,9 +1,13 @@
# StringEnumRef
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `SUCCESS` (value: `'success'`)
* `FAILURE` (value: `'failure'`)
* `UNCLASSIFIED` (value: `'unclassified'`)
[[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

@@ -1,10 +1,13 @@
# StringEnumRef
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `SUCCESS` (value: `'success'`)
* `FAILURE` (value: `'failure'`)
* `UNCLASSIFIED` (value: `'unclassified'`)
[[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

@@ -1,10 +1,13 @@
# EnumClass
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `ABC` (value: `'_abc'`)
* `MINUS_EFG` (value: `'-efg'`)
* `LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS` (value: `'(xyz)'`)
[[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

@@ -1,10 +1,11 @@
# EnumString1
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `A` (value: `'a'`)
* `B` (value: `'b'`)
[[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

@@ -1,10 +1,11 @@
# EnumString2
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `C` (value: `'c'`)
* `D` (value: `'d'`)
[[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

@@ -1,10 +1,13 @@
# OuterEnum
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,10 +1,13 @@
# OuterEnumDefaultValue
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,10 +1,13 @@
# OuterEnumInteger
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,10 +1,15 @@
# OuterEnumIntegerDefaultValue
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `NUMBER_MINUS_1` (value: `-1`)
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,10 +1,11 @@
# SingleRefType
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `ADMIN` (value: `'admin'`)
* `USER` (value: `'user'`)
[[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

@@ -1,10 +1,27 @@
# SpecialCharacterEnum
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `ENUM_456` (value: `'456'`)
* `ENUM_123ABC` (value: `'123abc'`)
* `UNDERSCORE` (value: `'_'`)
* `SPACE` (value: `' '`)
* `AMPERSAND` (value: `'&'`)
* `DOLLAR` (value: `'$'`)
* `GREATER_THAN_EQUAL` (value: `'>='`)
* `THIS_IS_EXCLAMATION` (value: `'this_is_!'`)
* `IMPORT` (value: `'import'`)
* `HELLO_WORLD` (value: `' hello world '`)
[[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

@@ -1,9 +1,13 @@
# EnumClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `ABC` (value: `'_abc'`)
* `MINUS_EFG` (value: `'-efg'`)
* `LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS` (value: `'(xyz)'`)
[[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

@@ -1,9 +1,11 @@
# EnumString1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `A` (value: `'a'`)
* `B` (value: `'b'`)
[[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

@@ -1,9 +1,11 @@
# EnumString2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `C` (value: `'c'`)
* `D` (value: `'d'`)
[[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

@@ -1,9 +1,13 @@
# OuterEnum
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,9 +1,13 @@
# OuterEnumDefaultValue
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,9 +1,13 @@
# OuterEnumInteger
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,9 +1,15 @@
# OuterEnumIntegerDefaultValue
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `NUMBER_MINUS_1` (value: `-1`)
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,9 +1,11 @@
# SingleRefType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `ADMIN` (value: `'admin'`)
* `USER` (value: `'user'`)
[[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

@@ -1,9 +1,27 @@
# SpecialCharacterEnum
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `ENUM_456` (value: `'456'`)
* `ENUM_123ABC` (value: `'123abc'`)
* `UNDERSCORE` (value: `'_'`)
* `SPACE` (value: `' '`)
* `AMPERSAND` (value: `'&'`)
* `DOLLAR` (value: `'$'`)
* `GREATER_THAN_EQUAL` (value: `'>='`)
* `THIS_IS_EXCLAMATION` (value: `'this_is_!'`)
* `IMPORT` (value: `'import'`)
* `HELLO_WORLD` (value: `' hello world '`)
[[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

@@ -1,9 +1,13 @@
# EnumClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `ABC` (value: `'_abc'`)
* `MINUS_EFG` (value: `'-efg'`)
* `LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS` (value: `'(xyz)'`)
[[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

@@ -1,9 +1,11 @@
# EnumString1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `A` (value: `'a'`)
* `B` (value: `'b'`)
[[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

@@ -1,9 +1,11 @@
# EnumString2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `C` (value: `'c'`)
* `D` (value: `'d'`)
[[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

@@ -1,9 +1,13 @@
# OuterEnum
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,9 +1,13 @@
# OuterEnumDefaultValue
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,9 +1,13 @@
# OuterEnumInteger
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,9 +1,15 @@
# OuterEnumIntegerDefaultValue
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `NUMBER_MINUS_1` (value: `-1`)
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,9 +1,11 @@
# SingleRefType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `ADMIN` (value: `'admin'`)
* `USER` (value: `'user'`)
[[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

@@ -1,9 +1,27 @@
# SpecialCharacterEnum
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
## Enum
* `ENUM_456` (value: `'456'`)
* `ENUM_123ABC` (value: `'123abc'`)
* `UNDERSCORE` (value: `'_'`)
* `SPACE` (value: `' '`)
* `AMPERSAND` (value: `'&'`)
* `DOLLAR` (value: `'$'`)
* `GREATER_THAN_EQUAL` (value: `'>='`)
* `THIS_IS_EXCLAMATION` (value: `'this_is_!'`)
* `IMPORT` (value: `'import'`)
* `HELLO_WORLD` (value: `' hello world '`)
[[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

@@ -1,10 +1,13 @@
# EnumClass
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `ABC` (value: `'_abc'`)
* `MINUS_EFG` (value: `'-efg'`)
* `LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS` (value: `'(xyz)'`)
[[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

@@ -1,10 +1,11 @@
# EnumString1
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `A` (value: `'a'`)
* `B` (value: `'b'`)
[[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

@@ -1,10 +1,11 @@
# EnumString2
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `C` (value: `'c'`)
* `D` (value: `'d'`)
[[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

@@ -1,10 +1,13 @@
# OuterEnum
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,10 +1,13 @@
# OuterEnumDefaultValue
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `PLACED` (value: `'placed'`)
* `APPROVED` (value: `'approved'`)
* `DELIVERED` (value: `'delivered'`)
[[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

@@ -1,10 +1,13 @@
# OuterEnumInteger
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,10 +1,15 @@
# OuterEnumIntegerDefaultValue
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `NUMBER_MINUS_1` (value: `-1`)
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)
[[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

@@ -1,10 +1,11 @@
# SingleRefType
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `ADMIN` (value: `'admin'`)
* `USER` (value: `'user'`)
[[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

@@ -1,10 +1,27 @@
# SpecialCharacterEnum
## Properties
## Enum
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `ENUM_456` (value: `'456'`)
* `ENUM_123ABC` (value: `'123abc'`)
* `UNDERSCORE` (value: `'_'`)
* `SPACE` (value: `' '`)
* `AMPERSAND` (value: `'&'`)
* `DOLLAR` (value: `'$'`)
* `GREATER_THAN_EQUAL` (value: `'>='`)
* `THIS_IS_EXCLAMATION` (value: `'this_is_!'`)
* `IMPORT` (value: `'import'`)
* `HELLO_WORLD` (value: `' hello world '`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)