Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit a2745ab

Browse files
committed
Adds string types to if then else samples
1 parent 100ee44 commit a2745ab

11 files changed

Lines changed: 918 additions & 0 deletions

File tree

samples/client/3_1_0_json_schema/python/.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ docs/components/schema/any_type_const_string.md
77
docs/components/schema/any_type_contains_value.md
88
docs/components/schema/any_type_dependent_required.md
99
docs/components/schema/any_type_dependent_schemas.md
10+
docs/components/schema/any_type_if_then_else.md
1011
docs/components/schema/any_type_max_contains_value.md
1112
docs/components/schema/any_type_min_contains_value.md
1213
docs/components/schema/any_type_pattern_properties.md
@@ -27,6 +28,7 @@ docs/components/schema/array_prefix_items.md
2728
docs/components/schema/array_unevaluated_items_false_with_prefix_items.md
2829
docs/components/schema/object_dependent_required.md
2930
docs/components/schema/object_dependent_schemas.md
31+
docs/components/schema/object_if_then_else.md
3032
docs/components/schema/object_pattern_properties.md
3133
docs/components/schema/object_property_names.md
3234
docs/components/schema/object_unevaluated_properties_false_with_properties.md
@@ -55,6 +57,7 @@ src/json_schema_api/components/schema/any_type_const_string.py
5557
src/json_schema_api/components/schema/any_type_contains_value.py
5658
src/json_schema_api/components/schema/any_type_dependent_required.py
5759
src/json_schema_api/components/schema/any_type_dependent_schemas.py
60+
src/json_schema_api/components/schema/any_type_if_then_else.py
5861
src/json_schema_api/components/schema/any_type_max_contains_value.py
5962
src/json_schema_api/components/schema/any_type_min_contains_value.py
6063
src/json_schema_api/components/schema/any_type_pattern_properties.py
@@ -75,6 +78,7 @@ src/json_schema_api/components/schema/array_prefix_items.py
7578
src/json_schema_api/components/schema/array_unevaluated_items_false_with_prefix_items.py
7679
src/json_schema_api/components/schema/object_dependent_required.py
7780
src/json_schema_api/components/schema/object_dependent_schemas.py
81+
src/json_schema_api/components/schema/object_if_then_else.py
7882
src/json_schema_api/components/schema/object_pattern_properties.py
7983
src/json_schema_api/components/schema/object_property_names.py
8084
src/json_schema_api/components/schema/object_unevaluated_properties_false_with_properties.py

samples/client/3_1_0_json_schema/python/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ Class | Description
177177
[AnyTypeContainsValue](docs/components/schema/any_type_contains_value.md) |
178178
[AnyTypeDependentRequired](docs/components/schema/any_type_dependent_required.md) |
179179
[AnyTypeDependentSchemas](docs/components/schema/any_type_dependent_schemas.md) |
180+
[AnyTypeIfThenElse](docs/components/schema/any_type_if_then_else.md) |
180181
[AnyTypeMaxContainsValue](docs/components/schema/any_type_max_contains_value.md) |
181182
[AnyTypeMinContainsValue](docs/components/schema/any_type_min_contains_value.md) |
182183
[AnyTypePatternProperties](docs/components/schema/any_type_pattern_properties.md) |
@@ -197,6 +198,7 @@ Class | Description
197198
[ArrayUnevaluatedItemsFalseWithPrefixItems](docs/components/schema/array_unevaluated_items_false_with_prefix_items.md) |
198199
[ObjectDependentRequired](docs/components/schema/object_dependent_required.md) |
199200
[ObjectDependentSchemas](docs/components/schema/object_dependent_schemas.md) |
201+
[ObjectIfThenElse](docs/components/schema/object_if_then_else.md) |
200202
[ObjectPatternProperties](docs/components/schema/object_pattern_properties.md) |
201203
[ObjectPropertyNames](docs/components/schema/object_property_names.md) |
202204
[ObjectUnevaluatedPropertiesFalseWithProperties](docs/components/schema/object_unevaluated_properties_false_with_properties.md) |
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# AnyTypeIfThenElse
2+
json_schema_api.components.schema.any_type_if_then_else
3+
```
4+
type: schemas.Schema
5+
```
6+
7+
## validate method
8+
Input Type | Return Type | Notes
9+
------------ | ------------- | -------------
10+
[AnyTypeIfThenElseDictInput](#anytypeifthenelsedictinput), [AnyTypeIfThenElseDict](#anytypeifthenelsedict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [AnyTypeIfThenElseDict](#anytypeifthenelsedict), str, float, int, bool, None, tuple, bytes, io.FileIO |
11+
12+
## AnyTypeIfThenElseDictInput
13+
```
14+
type: typing.Mapping[str, schemas.INPUT_TYPES_ALL]
15+
```
16+
Key | Type | Description | Notes
17+
------------ | ------------- | ------------- | -------------
18+
**street_address** | str | | [optional]
19+
**country** | typing.Literal["United States of America", "Canada"] | | [optional] must be one of ["United States of America", "Canada"] if omitted the server will use the default value of United States of America
20+
**any_string_name** | dict, schemas.immutabledict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.FileIO | any string name can be used but the value must be the correct type | [optional]
21+
22+
## AnyTypeIfThenElseDict
23+
```
24+
base class: schemas.immutabledict[str, str]
25+
26+
```
27+
### __new__ method
28+
Keyword Argument | Type | Description | Notes
29+
---------------- | ---- | ----------- | -----
30+
**street_address** | str, schemas.Unset | | [optional]
31+
**country** | typing.Literal["United States of America", "Canada"], schemas.Unset | | [optional] must be one of ["United States of America", "Canada"] if omitted the server will use the default value of United States of America
32+
**kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method
33+
34+
### properties
35+
Property | Type | Description | Notes
36+
-------- | ---- | ----------- | -----
37+
**street_address** | str, schemas.Unset | | [optional]
38+
**country** | typing.Literal["United States of America", "Canada"], schemas.Unset | | [optional] must be one of ["United States of America", "Canada"] if omitted the server will use the default value of United States of America
39+
40+
### methods
41+
Method | Input Type | Return Type | Notes
42+
------ | ---------- | ----------- | ------
43+
from_dict_ | [AnyTypeIfThenElseDictInput](#anytypeifthenelsedictinput), [AnyTypeIfThenElseDict](#anytypeifthenelsedict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [AnyTypeIfThenElseDict](#anytypeifthenelsedict), str, float, int, bool, None, tuple, bytes, io.FileIO | a constructor
44+
get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset }} | provides type safety for additional properties
45+
46+
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# ObjectIfThenElse
2+
json_schema_api.components.schema.object_if_then_else
3+
```
4+
type: schemas.Schema
5+
```
6+
7+
## validate method
8+
Input Type | Return Type | Notes
9+
------------ | ------------- | -------------
10+
[ObjectIfThenElseDictInput](#objectifthenelsedictinput), [ObjectIfThenElseDict](#objectifthenelsedict) | [ObjectIfThenElseDict](#objectifthenelsedict) |
11+
12+
## ObjectIfThenElseDictInput
13+
```
14+
type: typing.Mapping[str, schemas.INPUT_TYPES_ALL]
15+
```
16+
Key | Type | Description | Notes
17+
------------ | ------------- | ------------- | -------------
18+
**street_address** | str | | [optional]
19+
**country** | typing.Literal["United States of America", "Canada"] | | [optional] must be one of ["United States of America", "Canada"] if omitted the server will use the default value of United States of America
20+
**any_string_name** | dict, schemas.immutabledict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.FileIO | any string name can be used but the value must be the correct type | [optional]
21+
22+
## ObjectIfThenElseDict
23+
```
24+
base class: schemas.immutabledict[str, str]
25+
26+
```
27+
### __new__ method
28+
Keyword Argument | Type | Description | Notes
29+
---------------- | ---- | ----------- | -----
30+
**street_address** | str, schemas.Unset | | [optional]
31+
**country** | typing.Literal["United States of America", "Canada"], schemas.Unset | | [optional] must be one of ["United States of America", "Canada"] if omitted the server will use the default value of United States of America
32+
**kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method
33+
34+
### properties
35+
Property | Type | Description | Notes
36+
-------- | ---- | ----------- | -----
37+
**street_address** | str, schemas.Unset | | [optional]
38+
**country** | typing.Literal["United States of America", "Canada"], schemas.Unset | | [optional] must be one of ["United States of America", "Canada"] if omitted the server will use the default value of United States of America
39+
40+
### methods
41+
Method | Input Type | Return Type | Notes
42+
------ | ---------- | ----------- | ------
43+
from_dict_ | [ObjectIfThenElseDictInput](#objectifthenelsedictinput), [ObjectIfThenElseDict](#objectifthenelsedict) | [ObjectIfThenElseDict](#objectifthenelsedict) | a constructor
44+
get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset }} | provides type safety for additional properties
45+
46+
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)

0 commit comments

Comments
 (0)