Skip to content

Commit 7ef2004

Browse files
committed
update samples
1 parent 65d7fb3 commit 7ef2004

868 files changed

Lines changed: 16978 additions & 24707 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Bird.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ from openapi_client.models.bird import Bird
1616
# TODO update the JSON string below
1717
json = "{}"
1818
# create an instance of Bird from a JSON string
19-
bird_instance = Bird.from_json(json)
19+
bird_instance = Bird.model_validate_json(json)
2020
# print the JSON string representation of the object
21-
print(Bird.to_json())
21+
print(bird_instance.model_dump_json(by_alias=True, exclude_unset=True))
2222

2323
# convert the object into a dict
24-
bird_dict = bird_instance.to_dict()
24+
bird_dict = bird_instance.model_dump(by_alias=True)
2525
# create an instance of Bird from a dict
26-
bird_from_dict = Bird.from_dict(bird_dict)
26+
bird_from_dict = Bird.model_validate(bird_dict)
2727
```
2828
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2929

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Category.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ from openapi_client.models.category import Category
1616
# TODO update the JSON string below
1717
json = "{}"
1818
# create an instance of Category from a JSON string
19-
category_instance = Category.from_json(json)
19+
category_instance = Category.model_validate_json(json)
2020
# print the JSON string representation of the object
21-
print(Category.to_json())
21+
print(category_instance.model_dump_json(by_alias=True, exclude_unset=True))
2222

2323
# convert the object into a dict
24-
category_dict = category_instance.to_dict()
24+
category_dict = category_instance.model_dump(by_alias=True)
2525
# create an instance of Category from a dict
26-
category_from_dict = Category.from_dict(category_dict)
26+
category_from_dict = Category.model_validate(category_dict)
2727
```
2828
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2929

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DataQuery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ from openapi_client.models.data_query import DataQuery
1717
# TODO update the JSON string below
1818
json = "{}"
1919
# create an instance of DataQuery from a JSON string
20-
data_query_instance = DataQuery.from_json(json)
20+
data_query_instance = DataQuery.model_validate_json(json)
2121
# print the JSON string representation of the object
22-
print(DataQuery.to_json())
22+
print(data_query_instance.model_dump_json(by_alias=True, exclude_unset=True))
2323

2424
# convert the object into a dict
25-
data_query_dict = data_query_instance.to_dict()
25+
data_query_dict = data_query_instance.model_dump(by_alias=True)
2626
# create an instance of DataQuery from a dict
27-
data_query_from_dict = DataQuery.from_dict(data_query_dict)
27+
data_query_from_dict = DataQuery.model_validate(data_query_dict)
2828
```
2929
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3030

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/DefaultValue.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ from openapi_client.models.default_value import DefaultValue
2323
# TODO update the JSON string below
2424
json = "{}"
2525
# create an instance of DefaultValue from a JSON string
26-
default_value_instance = DefaultValue.from_json(json)
26+
default_value_instance = DefaultValue.model_validate_json(json)
2727
# print the JSON string representation of the object
28-
print(DefaultValue.to_json())
28+
print(default_value_instance.model_dump_json(by_alias=True, exclude_unset=True))
2929

3030
# convert the object into a dict
31-
default_value_dict = default_value_instance.to_dict()
31+
default_value_dict = default_value_instance.model_dump(by_alias=True)
3232
# create an instance of DefaultValue from a dict
33-
default_value_from_dict = DefaultValue.from_dict(default_value_dict)
33+
default_value_from_dict = DefaultValue.model_validate(default_value_dict)
3434
```
3535
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3636

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/NumberPropertiesOnly.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ from openapi_client.models.number_properties_only import NumberPropertiesOnly
1717
# TODO update the JSON string below
1818
json = "{}"
1919
# create an instance of NumberPropertiesOnly from a JSON string
20-
number_properties_only_instance = NumberPropertiesOnly.from_json(json)
20+
number_properties_only_instance = NumberPropertiesOnly.model_validate_json(json)
2121
# print the JSON string representation of the object
22-
print(NumberPropertiesOnly.to_json())
22+
print(number_properties_only_instance.model_dump_json(by_alias=True, exclude_unset=True))
2323

2424
# convert the object into a dict
25-
number_properties_only_dict = number_properties_only_instance.to_dict()
25+
number_properties_only_dict = number_properties_only_instance.model_dump(by_alias=True)
2626
# create an instance of NumberPropertiesOnly from a dict
27-
number_properties_only_from_dict = NumberPropertiesOnly.from_dict(number_properties_only_dict)
27+
number_properties_only_from_dict = NumberPropertiesOnly.model_validate(number_properties_only_dict)
2828
```
2929
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3030

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Pet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ from openapi_client.models.pet import Pet
2020
# TODO update the JSON string below
2121
json = "{}"
2222
# create an instance of Pet from a JSON string
23-
pet_instance = Pet.from_json(json)
23+
pet_instance = Pet.model_validate_json(json)
2424
# print the JSON string representation of the object
25-
print(Pet.to_json())
25+
print(pet_instance.model_dump_json(by_alias=True, exclude_unset=True))
2626

2727
# convert the object into a dict
28-
pet_dict = pet_instance.to_dict()
28+
pet_dict = pet_instance.model_dump(by_alias=True)
2929
# create an instance of Pet from a dict
30-
pet_from_dict = Pet.from_dict(pet_dict)
30+
pet_from_dict = Pet.model_validate(pet_dict)
3131
```
3232
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3333

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Query.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ from openapi_client.models.query import Query
1616
# TODO update the JSON string below
1717
json = "{}"
1818
# create an instance of Query from a JSON string
19-
query_instance = Query.from_json(json)
19+
query_instance = Query.model_validate_json(json)
2020
# print the JSON string representation of the object
21-
print(Query.to_json())
21+
print(query_instance.model_dump_json(by_alias=True, exclude_unset=True))
2222

2323
# convert the object into a dict
24-
query_dict = query_instance.to_dict()
24+
query_dict = query_instance.model_dump(by_alias=True)
2525
# create an instance of Query from a dict
26-
query_from_dict = Query.from_dict(query_dict)
26+
query_from_dict = Query.model_validate(query_dict)
2727
```
2828
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2929

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/Tag.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ from openapi_client.models.tag import Tag
1616
# TODO update the JSON string below
1717
json = "{}"
1818
# create an instance of Tag from a JSON string
19-
tag_instance = Tag.from_json(json)
19+
tag_instance = Tag.model_validate_json(json)
2020
# print the JSON string representation of the object
21-
print(Tag.to_json())
21+
print(tag_instance.model_dump_json(by_alias=True, exclude_unset=True))
2222

2323
# convert the object into a dict
24-
tag_dict = tag_instance.to_dict()
24+
tag_dict = tag_instance.model_dump(by_alias=True)
2525
# create an instance of Tag from a dict
26-
tag_from_dict = Tag.from_dict(tag_dict)
26+
tag_from_dict = Tag.model_validate(tag_dict)
2727
```
2828
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2929

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestFormObjectMultipartRequestMarker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ from openapi_client.models.test_form_object_multipart_request_marker import Test
1515
# TODO update the JSON string below
1616
json = "{}"
1717
# create an instance of TestFormObjectMultipartRequestMarker from a JSON string
18-
test_form_object_multipart_request_marker_instance = TestFormObjectMultipartRequestMarker.from_json(json)
18+
test_form_object_multipart_request_marker_instance = TestFormObjectMultipartRequestMarker.model_validate_json(json)
1919
# print the JSON string representation of the object
20-
print(TestFormObjectMultipartRequestMarker.to_json())
20+
print(test_form_object_multipart_request_marker_instance.model_dump_json(by_alias=True, exclude_unset=True))
2121

2222
# convert the object into a dict
23-
test_form_object_multipart_request_marker_dict = test_form_object_multipart_request_marker_instance.to_dict()
23+
test_form_object_multipart_request_marker_dict = test_form_object_multipart_request_marker_instance.model_dump(by_alias=True)
2424
# create an instance of TestFormObjectMultipartRequestMarker from a dict
25-
test_form_object_multipart_request_marker_from_dict = TestFormObjectMultipartRequestMarker.from_dict(test_form_object_multipart_request_marker_dict)
25+
test_form_object_multipart_request_marker_from_dict = TestFormObjectMultipartRequestMarker.model_validate(test_form_object_multipart_request_marker_dict)
2626
```
2727
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2828

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ from openapi_client.models.test_query_style_deep_object_explode_true_object_all_
1818
# TODO update the JSON string below
1919
json = "{}"
2020
# create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter from a JSON string
21-
test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.from_json(json)
21+
test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.model_validate_json(json)
2222
# print the JSON string representation of the object
23-
print(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.to_json())
23+
print(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance.model_dump_json(by_alias=True, exclude_unset=True))
2424

2525
# convert the object into a dict
26-
test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance.to_dict()
26+
test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict = test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance.model_dump(by_alias=True)
2727
# create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter from a dict
28-
test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_from_dict = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.from_dict(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict)
28+
test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_from_dict = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.model_validate(test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_dict)
2929
```
3030
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3131

0 commit comments

Comments
 (0)