forked from loafle/openapi-generator-original
[python] Update Markdown files for Models with fixed Python print() syntax (#17993)
* Update Markdown file with fixed Python example * ./bin/generate-samples.sh ./bin/configs/*.yaml
This commit is contained in:
@@ -18,7 +18,7 @@ json = "{}"
|
||||
# create an instance of Bird from a JSON string
|
||||
bird_instance = Bird.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Bird.to_json()
|
||||
print(Bird.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
bird_dict = bird_instance.to_dict()
|
||||
|
||||
@@ -18,7 +18,7 @@ json = "{}"
|
||||
# create an instance of Category from a JSON string
|
||||
category_instance = Category.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Category.to_json()
|
||||
print(Category.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
category_dict = category_instance.to_dict()
|
||||
|
||||
@@ -19,7 +19,7 @@ json = "{}"
|
||||
# create an instance of DataQuery from a JSON string
|
||||
data_query_instance = DataQuery.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print DataQuery.to_json()
|
||||
print(DataQuery.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
data_query_dict = data_query_instance.to_dict()
|
||||
|
||||
@@ -25,7 +25,7 @@ json = "{}"
|
||||
# create an instance of DefaultValue from a JSON string
|
||||
default_value_instance = DefaultValue.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print DefaultValue.to_json()
|
||||
print(DefaultValue.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
default_value_dict = default_value_instance.to_dict()
|
||||
|
||||
@@ -19,7 +19,7 @@ json = "{}"
|
||||
# create an instance of NumberPropertiesOnly from a JSON string
|
||||
number_properties_only_instance = NumberPropertiesOnly.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print NumberPropertiesOnly.to_json()
|
||||
print(NumberPropertiesOnly.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
number_properties_only_dict = number_properties_only_instance.to_dict()
|
||||
|
||||
@@ -22,7 +22,7 @@ json = "{}"
|
||||
# create an instance of Pet from a JSON string
|
||||
pet_instance = Pet.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Pet.to_json()
|
||||
print(Pet.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
pet_dict = pet_instance.to_dict()
|
||||
|
||||
@@ -18,7 +18,7 @@ json = "{}"
|
||||
# create an instance of Query from a JSON string
|
||||
query_instance = Query.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Query.to_json()
|
||||
print(Query.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
query_dict = query_instance.to_dict()
|
||||
|
||||
@@ -18,7 +18,7 @@ json = "{}"
|
||||
# create an instance of Tag from a JSON string
|
||||
tag_instance = Tag.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print Tag.to_json()
|
||||
print(Tag.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
tag_dict = tag_instance.to_dict()
|
||||
|
||||
@@ -20,7 +20,7 @@ json = "{}"
|
||||
# create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter from a JSON string
|
||||
test_query_style_deep_object_explode_true_object_all_of_query_object_parameter_instance = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.to_json()
|
||||
print(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
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()
|
||||
|
||||
@@ -17,7 +17,7 @@ json = "{}"
|
||||
# create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter from a JSON string
|
||||
test_query_style_form_explode_true_array_string_query_object_parameter_instance = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.to_json()
|
||||
print(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
test_query_style_form_explode_true_array_string_query_object_parameter_dict = test_query_style_form_explode_true_array_string_query_object_parameter_instance.to_dict()
|
||||
|
||||
Reference in New Issue
Block a user