From 8acf9b779da867f82a5dd5ec5eb60c7ef0a6d1cc Mon Sep 17 00:00:00 2001 From: Nick Cooper Date: Sat, 23 Mar 2024 23:36:15 -0400 Subject: [PATCH] Specify named param for field defaults in Python Pydantic V1 generator (#18187) * Use named parameter * Regenerate samples --- .../languages/AbstractPythonPydanticV1Codegen.java | 2 +- .../openapi_client/models/data_query.py | 6 +++--- .../python-pydantic-v1/openapi_client/models/pet.py | 4 ++-- .../openapi_client/models/query.py | 2 +- .../petstore_api/models/all_of_with_single_ref.py | 2 +- .../petstore_api/models/animal.py | 2 +- .../petstore_api/models/any_of_color.py | 6 +++--- .../models/array_of_array_of_number_only.py | 2 +- .../petstore_api/models/array_of_number_only.py | 2 +- .../petstore_api/models/basque_pig.py | 2 +- .../petstore_api/models/capitalization.py | 12 ++++++------ .../petstore_api/models/class_model.py | 2 +- .../petstore_api/models/color.py | 6 +++--- .../petstore_api/models/danish_pig.py | 2 +- .../models/discriminator_all_of_super.py | 2 +- .../petstore_api/models/enum_test.py | 8 ++++---- .../petstore_api/models/file.py | 2 +- .../petstore_api/models/format_test.py | 8 ++++---- .../petstore_api/models/health_check_result.py | 2 +- .../petstore_api/models/inner_dict_with_property.py | 2 +- .../petstore_api/models/list_class.py | 2 +- .../petstore_api/models/map_of_array_of_model.py | 2 +- ...xed_properties_and_additional_properties_class.py | 2 +- .../petstore_api/models/model200_response.py | 2 +- .../petstore_api/models/model_return.py | 2 +- .../petstore_api/models/name.py | 4 ++-- .../petstore_api/models/number_only.py | 2 +- .../models/object_to_test_additional_properties.py | 2 +- .../models/object_with_deprecated_fields.py | 2 +- .../petstore_api/models/order.py | 6 +++--- .../petstore_api/models/parent.py | 2 +- .../petstore_api/models/parent_with_optional_dict.py | 2 +- .../petstore_api/models/pet.py | 4 ++-- .../petstore_api/models/property_name_collision.py | 2 +- .../petstore_api/models/special_model_name.py | 2 +- .../petstore_api/models/special_name.py | 6 +++--- ..._inline_freeform_additional_properties_request.py | 2 +- ...med_dict_with_additional_model_list_properties.py | 2 +- ...ed_dict_with_additional_string_list_properties.py | 2 +- .../petstore_api/models/user.py | 6 +++--- .../petstore_api/models/all_of_with_single_ref.py | 2 +- .../python-pydantic-v1/petstore_api/models/animal.py | 2 +- .../petstore_api/models/any_of_color.py | 6 +++--- .../models/array_of_array_of_number_only.py | 2 +- .../petstore_api/models/array_of_number_only.py | 2 +- .../petstore_api/models/basque_pig.py | 2 +- .../petstore_api/models/capitalization.py | 12 ++++++------ .../petstore_api/models/class_model.py | 2 +- .../python-pydantic-v1/petstore_api/models/color.py | 6 +++--- .../petstore_api/models/danish_pig.py | 2 +- .../models/discriminator_all_of_super.py | 2 +- .../petstore_api/models/enum_test.py | 8 ++++---- .../python-pydantic-v1/petstore_api/models/file.py | 2 +- .../petstore_api/models/format_test.py | 8 ++++---- .../petstore_api/models/health_check_result.py | 2 +- .../petstore_api/models/inner_dict_with_property.py | 2 +- .../petstore_api/models/list_class.py | 2 +- .../petstore_api/models/map_of_array_of_model.py | 2 +- ...xed_properties_and_additional_properties_class.py | 2 +- .../petstore_api/models/model200_response.py | 2 +- .../petstore_api/models/model_return.py | 2 +- .../python-pydantic-v1/petstore_api/models/name.py | 4 ++-- .../petstore_api/models/number_only.py | 2 +- .../models/object_to_test_additional_properties.py | 2 +- .../models/object_with_deprecated_fields.py | 2 +- .../python-pydantic-v1/petstore_api/models/order.py | 6 +++--- .../python-pydantic-v1/petstore_api/models/parent.py | 2 +- .../petstore_api/models/parent_with_optional_dict.py | 2 +- .../python-pydantic-v1/petstore_api/models/pet.py | 4 ++-- .../petstore_api/models/property_name_collision.py | 4 ++-- .../petstore_api/models/special_model_name.py | 2 +- .../petstore_api/models/special_name.py | 6 +++--- ..._inline_freeform_additional_properties_request.py | 2 +- ...med_dict_with_additional_model_list_properties.py | 2 +- ...ed_dict_with_additional_string_list_properties.py | 2 +- .../python-pydantic-v1/petstore_api/models/user.py | 6 +++--- 76 files changed, 126 insertions(+), 126 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java index 6c2adeba495..eceec06007f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java @@ -956,7 +956,7 @@ public abstract class AbstractPythonPydanticV1Codegen extends DefaultCodegen imp } if (!fields.isEmpty()) { - fields.add(0, fieldCustomization); + fields.add(0, "default=" + fieldCustomization); pydanticImports.add("Field"); fieldCustomization = String.format(Locale.ROOT, "Field(%s)", StringUtils.join(fields, ", ")); } diff --git a/samples/client/echo_api/python-pydantic-v1/openapi_client/models/data_query.py b/samples/client/echo_api/python-pydantic-v1/openapi_client/models/data_query.py index af8078549f1..84f355f3fdd 100644 --- a/samples/client/echo_api/python-pydantic-v1/openapi_client/models/data_query.py +++ b/samples/client/echo_api/python-pydantic-v1/openapi_client/models/data_query.py @@ -27,9 +27,9 @@ class DataQuery(Query): """ DataQuery """ - suffix: Optional[StrictStr] = Field(None, description="test suffix") - text: Optional[StrictStr] = Field(None, description="Some text containing white spaces") - var_date: Optional[datetime] = Field(None, alias="date", description="A date") + suffix: Optional[StrictStr] = Field(default=None, description="test suffix") + text: Optional[StrictStr] = Field(default=None, description="Some text containing white spaces") + var_date: Optional[datetime] = Field(default=None, alias="date", description="A date") __properties = ["id", "outcomes", "suffix", "text", "date"] class Config: diff --git a/samples/client/echo_api/python-pydantic-v1/openapi_client/models/pet.py b/samples/client/echo_api/python-pydantic-v1/openapi_client/models/pet.py index 3a40ddc0321..26832037b0e 100644 --- a/samples/client/echo_api/python-pydantic-v1/openapi_client/models/pet.py +++ b/samples/client/echo_api/python-pydantic-v1/openapi_client/models/pet.py @@ -31,9 +31,9 @@ class Pet(BaseModel): id: Optional[StrictInt] = None name: StrictStr = Field(...) category: Optional[Category] = None - photo_urls: conlist(StrictStr) = Field(..., alias="photoUrls") + photo_urls: conlist(StrictStr) = Field(default=..., alias="photoUrls") tags: Optional[conlist(Tag)] = None - status: Optional[StrictStr] = Field(None, description="pet status in the store") + status: Optional[StrictStr] = Field(default=None, description="pet status in the store") __properties = ["id", "name", "category", "photoUrls", "tags", "status"] @validator('status') diff --git a/samples/client/echo_api/python-pydantic-v1/openapi_client/models/query.py b/samples/client/echo_api/python-pydantic-v1/openapi_client/models/query.py index 02e4233d513..43919c0f569 100644 --- a/samples/client/echo_api/python-pydantic-v1/openapi_client/models/query.py +++ b/samples/client/echo_api/python-pydantic-v1/openapi_client/models/query.py @@ -26,7 +26,7 @@ class Query(BaseModel): """ Query """ - id: Optional[StrictInt] = Field(None, description="Query") + id: Optional[StrictInt] = Field(default=None, description="Query") outcomes: Optional[conlist(StrictStr)] = None __properties = ["id", "outcomes"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/all_of_with_single_ref.py index c5d066463f6..a02cecd8e34 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/all_of_with_single_ref.py @@ -27,7 +27,7 @@ class AllOfWithSingleRef(BaseModel): AllOfWithSingleRef """ username: Optional[StrictStr] = None - single_ref_type: Optional[SingleRefType] = Field(None, alias="SingleRefType") + single_ref_type: Optional[SingleRefType] = Field(default=None, alias="SingleRefType") __properties = ["username", "SingleRefType"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/animal.py index 5909850c019..d299cee14f7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/animal.py @@ -31,7 +31,7 @@ class Animal(BaseModel): """ Animal """ - class_name: StrictStr = Field(..., alias="className") + class_name: StrictStr = Field(default=..., alias="className") color: Optional[StrictStr] = 'red' __properties = ["className", "color"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/any_of_color.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/any_of_color.py index b422650686f..60dbbe6dd7e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/any_of_color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/any_of_color.py @@ -31,11 +31,11 @@ class AnyOfColor(BaseModel): """ # data type: List[int] - anyof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(None, description="RGB three element array with values 0-255.") + anyof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(default=None, description="RGB three element array with values 0-255.") # data type: List[int] - anyof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(None, description="RGBA four element array with values 0-255.") + anyof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(default=None, description="RGBA four element array with values 0-255.") # data type: str - anyof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(None, description="Hex color string, such as #00FF00.") + anyof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(default=None, description="Hex color string, such as #00FF00.") if TYPE_CHECKING: actual_instance: Union[List[int], str] else: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_array_of_number_only.py index 8ce909858b1..3c160bb5303 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_array_of_number_only.py @@ -25,7 +25,7 @@ class ArrayOfArrayOfNumberOnly(BaseModel): """ ArrayOfArrayOfNumberOnly """ - array_array_number: Optional[conlist(conlist(float))] = Field(None, alias="ArrayArrayNumber") + array_array_number: Optional[conlist(conlist(float))] = Field(default=None, alias="ArrayArrayNumber") __properties = ["ArrayArrayNumber"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_number_only.py index 768ea5ef0ba..ce172811448 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/array_of_number_only.py @@ -25,7 +25,7 @@ class ArrayOfNumberOnly(BaseModel): """ ArrayOfNumberOnly """ - array_number: Optional[conlist(float)] = Field(None, alias="ArrayNumber") + array_number: Optional[conlist(float)] = Field(default=None, alias="ArrayNumber") __properties = ["ArrayNumber"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/basque_pig.py index 5683a73a3bf..6efcc0a9b65 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/basque_pig.py @@ -25,7 +25,7 @@ class BasquePig(BaseModel): """ BasquePig """ - class_name: StrictStr = Field(..., alias="className") + class_name: StrictStr = Field(default=..., alias="className") color: StrictStr = Field(...) __properties = ["className", "color"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/capitalization.py index 2bb4435563b..9191b76ccd7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/capitalization.py @@ -25,12 +25,12 @@ class Capitalization(BaseModel): """ Capitalization """ - small_camel: Optional[StrictStr] = Field(None, alias="smallCamel") - capital_camel: Optional[StrictStr] = Field(None, alias="CapitalCamel") - small_snake: Optional[StrictStr] = Field(None, alias="small_Snake") - capital_snake: Optional[StrictStr] = Field(None, alias="Capital_Snake") - sca_eth_flow_points: Optional[StrictStr] = Field(None, alias="SCA_ETH_Flow_Points") - att_name: Optional[StrictStr] = Field(None, alias="ATT_NAME", description="Name of the pet ") + small_camel: Optional[StrictStr] = Field(default=None, alias="smallCamel") + capital_camel: Optional[StrictStr] = Field(default=None, alias="CapitalCamel") + small_snake: Optional[StrictStr] = Field(default=None, alias="small_Snake") + capital_snake: Optional[StrictStr] = Field(default=None, alias="Capital_Snake") + sca_eth_flow_points: Optional[StrictStr] = Field(default=None, alias="SCA_ETH_Flow_Points") + att_name: Optional[StrictStr] = Field(default=None, alias="ATT_NAME", description="Name of the pet ") __properties = ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/class_model.py index d345924958e..01e00e6328a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/class_model.py @@ -25,7 +25,7 @@ class ClassModel(BaseModel): """ Model for testing model with \"_class\" property # noqa: E501 """ - var_class: Optional[StrictStr] = Field(None, alias="_class") + var_class: Optional[StrictStr] = Field(default=None, alias="_class") __properties = ["_class"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/color.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/color.py index 4dee9419ab7..8500a75d832 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/color.py @@ -30,11 +30,11 @@ class Color(BaseModel): RGB array, RGBA array, or hex string. """ # data type: List[int] - oneof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(None, description="RGB three element array with values 0-255.") + oneof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(default=None, description="RGB three element array with values 0-255.") # data type: List[int] - oneof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(None, description="RGBA four element array with values 0-255.") + oneof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(default=None, description="RGBA four element array with values 0-255.") # data type: str - oneof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(None, description="Hex color string, such as #00FF00.") + oneof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(default=None, description="Hex color string, such as #00FF00.") if TYPE_CHECKING: actual_instance: Union[List[int], str] else: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/danish_pig.py index cfb24a7d585..b53aa722187 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/danish_pig.py @@ -25,7 +25,7 @@ class DanishPig(BaseModel): """ DanishPig """ - class_name: StrictStr = Field(..., alias="className") + class_name: StrictStr = Field(default=..., alias="className") size: StrictInt = Field(...) __properties = ["className", "size"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/discriminator_all_of_super.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/discriminator_all_of_super.py index 4c808fbd408..d476746d035 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/discriminator_all_of_super.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/discriminator_all_of_super.py @@ -30,7 +30,7 @@ class DiscriminatorAllOfSuper(BaseModel): """ DiscriminatorAllOfSuper """ - element_type: StrictStr = Field(..., alias="elementType") + element_type: StrictStr = Field(default=..., alias="elementType") __properties = ["elementType"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py index b3899720fd3..5630ebfa1a3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py @@ -34,10 +34,10 @@ class EnumTest(BaseModel): enum_integer_default: Optional[StrictInt] = 5 enum_integer: Optional[StrictInt] = None enum_number: Optional[float] = None - outer_enum: Optional[OuterEnum] = Field(None, alias="outerEnum") - outer_enum_integer: Optional[OuterEnumInteger] = Field(None, alias="outerEnumInteger") - outer_enum_default_value: Optional[OuterEnumDefaultValue] = Field(None, alias="outerEnumDefaultValue") - outer_enum_integer_default_value: Optional[OuterEnumIntegerDefaultValue] = Field(None, alias="outerEnumIntegerDefaultValue") + outer_enum: Optional[OuterEnum] = Field(default=None, alias="outerEnum") + outer_enum_integer: Optional[OuterEnumInteger] = Field(default=None, alias="outerEnumInteger") + outer_enum_default_value: Optional[OuterEnumDefaultValue] = Field(default=None, alias="outerEnumDefaultValue") + outer_enum_integer_default_value: Optional[OuterEnumIntegerDefaultValue] = Field(default=None, alias="outerEnumIntegerDefaultValue") __properties = ["enum_string", "enum_string_required", "enum_integer_default", "enum_integer", "enum_number", "outerEnum", "outerEnumInteger", "outerEnumDefaultValue", "outerEnumIntegerDefaultValue"] @validator('enum_string') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/file.py index c87e30f73bf..3d2e4e288bf 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/file.py @@ -25,7 +25,7 @@ class File(BaseModel): """ Must be named `File` for test. # noqa: E501 """ - source_uri: Optional[StrictStr] = Field(None, alias="sourceURI", description="Test capitalization") + source_uri: Optional[StrictStr] = Field(default=None, alias="sourceURI", description="Test capitalization") __properties = ["sourceURI"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/format_test.py index a0abc32a659..e8ba23b7243 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/format_test.py @@ -36,12 +36,12 @@ class FormatTest(BaseModel): string_with_double_quote_pattern: Optional[constr(strict=True)] = None byte: Optional[Union[StrictBytes, StrictStr]] = None binary: Optional[Union[StrictBytes, StrictStr]] = None - var_date: date = Field(..., alias="date") - date_time: Optional[datetime] = Field(None, alias="dateTime") + var_date: date = Field(default=..., alias="date") + date_time: Optional[datetime] = Field(default=None, alias="dateTime") uuid: Optional[StrictStr] = None password: constr(strict=True, max_length=64, min_length=10) = Field(...) - pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.") - pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") + pattern_with_digits: Optional[constr(strict=True)] = Field(default=None, description="A string that is a 10 digit number. Can have leading zeros.") + pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(default=None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") __properties = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"] @validator('string') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/health_check_result.py index 02405bea384..a914e4ffeec 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/health_check_result.py @@ -25,7 +25,7 @@ class HealthCheckResult(BaseModel): """ Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. # noqa: E501 """ - nullable_message: Optional[StrictStr] = Field(None, alias="NullableMessage") + nullable_message: Optional[StrictStr] = Field(default=None, alias="NullableMessage") __properties = ["NullableMessage"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/inner_dict_with_property.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/inner_dict_with_property.py index 9f134186b6a..a455a5bb59d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/inner_dict_with_property.py @@ -25,7 +25,7 @@ class InnerDictWithProperty(BaseModel): """ InnerDictWithProperty """ - a_property: Optional[Dict[str, Any]] = Field(None, alias="aProperty") + a_property: Optional[Dict[str, Any]] = Field(default=None, alias="aProperty") __properties = ["aProperty"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/list_class.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/list_class.py index ea187d934d4..23aebf15d17 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/list_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/list_class.py @@ -25,7 +25,7 @@ class ListClass(BaseModel): """ ListClass """ - var_123_list: Optional[StrictStr] = Field(None, alias="123-list") + var_123_list: Optional[StrictStr] = Field(default=None, alias="123-list") __properties = ["123-list"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/map_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/map_of_array_of_model.py index f5f86d4438a..3e0c5f2f782 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/map_of_array_of_model.py @@ -26,7 +26,7 @@ class MapOfArrayOfModel(BaseModel): """ MapOfArrayOfModel """ - shop_id_to_org_online_lip_map: Optional[Dict[str, conlist(Tag)]] = Field(None, alias="shopIdToOrgOnlineLipMap") + shop_id_to_org_online_lip_map: Optional[Dict[str, conlist(Tag)]] = Field(default=None, alias="shopIdToOrgOnlineLipMap") __properties = ["shopIdToOrgOnlineLipMap"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py index 03f306af535..59b1adeee43 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -27,7 +27,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): MixedPropertiesAndAdditionalPropertiesClass """ uuid: Optional[StrictStr] = None - date_time: Optional[datetime] = Field(None, alias="dateTime") + date_time: Optional[datetime] = Field(default=None, alias="dateTime") map: Optional[Dict[str, Animal]] = None __properties = ["uuid", "dateTime", "map"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model200_response.py index f129e4dafe8..7efca1e6041 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model200_response.py @@ -26,7 +26,7 @@ class Model200Response(BaseModel): Model for testing model name starting with number # noqa: E501 """ name: Optional[StrictInt] = None - var_class: Optional[StrictStr] = Field(None, alias="class") + var_class: Optional[StrictStr] = Field(default=None, alias="class") __properties = ["name", "class"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model_return.py index 1d2b0266d34..69be3ef4b95 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/model_return.py @@ -25,7 +25,7 @@ class ModelReturn(BaseModel): """ Model for testing reserved words # noqa: E501 """ - var_return: Optional[StrictInt] = Field(None, alias="return") + var_return: Optional[StrictInt] = Field(default=None, alias="return") __properties = ["return"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/name.py index 5284db112e9..200ad652b34 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/name.py @@ -27,8 +27,8 @@ class Name(BaseModel): """ name: StrictInt = Field(...) snake_case: Optional[StrictInt] = None - var_property: Optional[StrictStr] = Field(None, alias="property") - var_123_number: Optional[StrictInt] = Field(None, alias="123Number") + var_property: Optional[StrictStr] = Field(default=None, alias="property") + var_123_number: Optional[StrictInt] = Field(default=None, alias="123Number") __properties = ["name", "snake_case", "property", "123Number"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/number_only.py index 6549b261782..b194840c0c1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/number_only.py @@ -25,7 +25,7 @@ class NumberOnly(BaseModel): """ NumberOnly """ - just_number: Optional[float] = Field(None, alias="JustNumber") + just_number: Optional[float] = Field(default=None, alias="JustNumber") __properties = ["JustNumber"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_to_test_additional_properties.py index f609e06f6a9..b78667ae090 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_to_test_additional_properties.py @@ -25,7 +25,7 @@ class ObjectToTestAdditionalProperties(BaseModel): """ Minimal object # noqa: E501 """ - var_property: Optional[StrictBool] = Field(False, alias="property", description="Property") + var_property: Optional[StrictBool] = Field(default=False, alias="property", description="Property") __properties = ["property"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_with_deprecated_fields.py index 421206c1bc7..e976e40738b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/object_with_deprecated_fields.py @@ -28,7 +28,7 @@ class ObjectWithDeprecatedFields(BaseModel): """ uuid: Optional[StrictStr] = None id: Optional[float] = None - deprecated_ref: Optional[DeprecatedObject] = Field(None, alias="deprecatedRef") + deprecated_ref: Optional[DeprecatedObject] = Field(default=None, alias="deprecatedRef") bars: Optional[conlist(StrictStr)] = None __properties = ["uuid", "id", "deprecatedRef", "bars"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/order.py index da726d2096d..ca0c5e46b17 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/order.py @@ -26,10 +26,10 @@ class Order(BaseModel): Order """ id: Optional[StrictInt] = None - pet_id: Optional[StrictInt] = Field(None, alias="petId") + pet_id: Optional[StrictInt] = Field(default=None, alias="petId") quantity: Optional[StrictInt] = None - ship_date: Optional[datetime] = Field(None, alias="shipDate") - status: Optional[StrictStr] = Field(None, description="Order Status") + ship_date: Optional[datetime] = Field(default=None, alias="shipDate") + status: Optional[StrictStr] = Field(default=None, description="Order Status") complete: Optional[StrictBool] = False __properties = ["id", "petId", "quantity", "shipDate", "status", "complete"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent.py index a3105aff682..5abdaa38114 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent.py @@ -26,7 +26,7 @@ class Parent(BaseModel): """ Parent """ - optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") + optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict") __properties = ["optionalDict"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent_with_optional_dict.py index 253747b3abd..1ef78770503 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/parent_with_optional_dict.py @@ -26,7 +26,7 @@ class ParentWithOptionalDict(BaseModel): """ ParentWithOptionalDict """ - optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") + optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict") __properties = ["optionalDict"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/pet.py index e45fdc4a27d..2c97c7e598a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/pet.py @@ -30,9 +30,9 @@ class Pet(BaseModel): id: Optional[StrictInt] = None category: Optional[Category] = None name: StrictStr = Field(...) - photo_urls: conlist(StrictStr, min_items=0, unique_items=True) = Field(..., alias="photoUrls") + photo_urls: conlist(StrictStr, min_items=0, unique_items=True) = Field(default=..., alias="photoUrls") tags: Optional[conlist(Tag)] = None - status: Optional[StrictStr] = Field(None, description="pet status in the store") + status: Optional[StrictStr] = Field(default=None, description="pet status in the store") __properties = ["id", "category", "name", "photoUrls", "tags", "status"] @validator('status') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/property_name_collision.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/property_name_collision.py index ed45ecdf74c..43d74bed7c5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/property_name_collision.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/property_name_collision.py @@ -25,7 +25,7 @@ class PropertyNameCollision(BaseModel): """ PropertyNameCollision """ - type: Optional[StrictStr] = Field(None, alias="_type") + type: Optional[StrictStr] = Field(default=None, alias="_type") type: Optional[StrictStr] = None type_: Optional[StrictStr] = None __properties = ["_type", "type", "type_"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_model_name.py index 43e57ff7b7b..16c328fa550 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_model_name.py @@ -25,7 +25,7 @@ class SpecialModelName(BaseModel): """ SpecialModelName """ - special_property_name: Optional[StrictInt] = Field(None, alias="$special[property.name]") + special_property_name: Optional[StrictInt] = Field(default=None, alias="$special[property.name]") __properties = ["$special[property.name]"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_name.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_name.py index f8841f7a4cc..2d3ad63ffcf 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/special_name.py @@ -26,9 +26,9 @@ class SpecialName(BaseModel): """ SpecialName """ - var_property: Optional[StrictInt] = Field(None, alias="property") - var_async: Optional[Category] = Field(None, alias="async") - var_schema: Optional[StrictStr] = Field(None, alias="schema", description="pet status in the store") + var_property: Optional[StrictInt] = Field(default=None, alias="property") + var_async: Optional[Category] = Field(default=None, alias="async") + var_schema: Optional[StrictStr] = Field(default=None, alias="schema", description="pet status in the store") __properties = ["property", "async", "schema"] @validator('var_schema') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py index a77233c5677..41b768501e8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py @@ -25,7 +25,7 @@ class TestInlineFreeformAdditionalPropertiesRequest(BaseModel): """ TestInlineFreeformAdditionalPropertiesRequest """ - some_property: Optional[StrictStr] = Field(None, alias="someProperty") + some_property: Optional[StrictStr] = Field(default=None, alias="someProperty") additional_properties: Dict[str, Any] = {} __properties = ["someProperty"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py index 20774544b3e..f4e22caa9d2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py @@ -26,7 +26,7 @@ class UnnamedDictWithAdditionalModelListProperties(BaseModel): """ UnnamedDictWithAdditionalModelListProperties """ - dict_property: Optional[Dict[str, conlist(CreatureInfo)]] = Field(None, alias="dictProperty") + dict_property: Optional[Dict[str, conlist(CreatureInfo)]] = Field(default=None, alias="dictProperty") __properties = ["dictProperty"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py index 75f8307e281..af559dfa890 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py @@ -25,7 +25,7 @@ class UnnamedDictWithAdditionalStringListProperties(BaseModel): """ UnnamedDictWithAdditionalStringListProperties """ - dict_property: Optional[Dict[str, conlist(StrictStr)]] = Field(None, alias="dictProperty") + dict_property: Optional[Dict[str, conlist(StrictStr)]] = Field(default=None, alias="dictProperty") __properties = ["dictProperty"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/user.py index 5c09a897c70..df5086cb457 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/user.py @@ -27,12 +27,12 @@ class User(BaseModel): """ id: Optional[StrictInt] = None username: Optional[StrictStr] = None - first_name: Optional[StrictStr] = Field(None, alias="firstName") - last_name: Optional[StrictStr] = Field(None, alias="lastName") + first_name: Optional[StrictStr] = Field(default=None, alias="firstName") + last_name: Optional[StrictStr] = Field(default=None, alias="lastName") email: Optional[StrictStr] = None password: Optional[StrictStr] = None phone: Optional[StrictStr] = None - user_status: Optional[StrictInt] = Field(None, alias="userStatus", description="User Status") + user_status: Optional[StrictInt] = Field(default=None, alias="userStatus", description="User Status") __properties = ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"] class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/all_of_with_single_ref.py index f0fba038642..802db7ad765 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/all_of_with_single_ref.py @@ -27,7 +27,7 @@ class AllOfWithSingleRef(BaseModel): AllOfWithSingleRef """ username: Optional[StrictStr] = None - single_ref_type: Optional[SingleRefType] = Field(None, alias="SingleRefType") + single_ref_type: Optional[SingleRefType] = Field(default=None, alias="SingleRefType") additional_properties: Dict[str, Any] = {} __properties = ["username", "SingleRefType"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/animal.py index 1c40beec4e5..652e2e9a1b5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/animal.py @@ -31,7 +31,7 @@ class Animal(BaseModel): """ Animal """ - class_name: StrictStr = Field(..., alias="className") + class_name: StrictStr = Field(default=..., alias="className") color: Optional[StrictStr] = 'red' additional_properties: Dict[str, Any] = {} __properties = ["className", "color"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/any_of_color.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/any_of_color.py index b422650686f..60dbbe6dd7e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/any_of_color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/any_of_color.py @@ -31,11 +31,11 @@ class AnyOfColor(BaseModel): """ # data type: List[int] - anyof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(None, description="RGB three element array with values 0-255.") + anyof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(default=None, description="RGB three element array with values 0-255.") # data type: List[int] - anyof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(None, description="RGBA four element array with values 0-255.") + anyof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(default=None, description="RGBA four element array with values 0-255.") # data type: str - anyof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(None, description="Hex color string, such as #00FF00.") + anyof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(default=None, description="Hex color string, such as #00FF00.") if TYPE_CHECKING: actual_instance: Union[List[int], str] else: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_array_of_number_only.py index 45ffc93e2bb..9ec3b1c8fa6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_array_of_number_only.py @@ -25,7 +25,7 @@ class ArrayOfArrayOfNumberOnly(BaseModel): """ ArrayOfArrayOfNumberOnly """ - array_array_number: Optional[conlist(conlist(StrictFloat))] = Field(None, alias="ArrayArrayNumber") + array_array_number: Optional[conlist(conlist(StrictFloat))] = Field(default=None, alias="ArrayArrayNumber") additional_properties: Dict[str, Any] = {} __properties = ["ArrayArrayNumber"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_number_only.py index ff06726b621..2b995cdf3c1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/array_of_number_only.py @@ -25,7 +25,7 @@ class ArrayOfNumberOnly(BaseModel): """ ArrayOfNumberOnly """ - array_number: Optional[conlist(StrictFloat)] = Field(None, alias="ArrayNumber") + array_number: Optional[conlist(StrictFloat)] = Field(default=None, alias="ArrayNumber") additional_properties: Dict[str, Any] = {} __properties = ["ArrayNumber"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/basque_pig.py index c9f6603166f..00c6cacbb8e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/basque_pig.py @@ -25,7 +25,7 @@ class BasquePig(BaseModel): """ BasquePig """ - class_name: StrictStr = Field(..., alias="className") + class_name: StrictStr = Field(default=..., alias="className") color: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} __properties = ["className", "color"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/capitalization.py index 3685da0822c..862b38b3940 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/capitalization.py @@ -25,12 +25,12 @@ class Capitalization(BaseModel): """ Capitalization """ - small_camel: Optional[StrictStr] = Field(None, alias="smallCamel") - capital_camel: Optional[StrictStr] = Field(None, alias="CapitalCamel") - small_snake: Optional[StrictStr] = Field(None, alias="small_Snake") - capital_snake: Optional[StrictStr] = Field(None, alias="Capital_Snake") - sca_eth_flow_points: Optional[StrictStr] = Field(None, alias="SCA_ETH_Flow_Points") - att_name: Optional[StrictStr] = Field(None, alias="ATT_NAME", description="Name of the pet ") + small_camel: Optional[StrictStr] = Field(default=None, alias="smallCamel") + capital_camel: Optional[StrictStr] = Field(default=None, alias="CapitalCamel") + small_snake: Optional[StrictStr] = Field(default=None, alias="small_Snake") + capital_snake: Optional[StrictStr] = Field(default=None, alias="Capital_Snake") + sca_eth_flow_points: Optional[StrictStr] = Field(default=None, alias="SCA_ETH_Flow_Points") + att_name: Optional[StrictStr] = Field(default=None, alias="ATT_NAME", description="Name of the pet ") additional_properties: Dict[str, Any] = {} __properties = ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/class_model.py index f9464aa8562..74cd65c5bc0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/class_model.py @@ -25,7 +25,7 @@ class ClassModel(BaseModel): """ Model for testing model with \"_class\" property # noqa: E501 """ - var_class: Optional[StrictStr] = Field(None, alias="_class") + var_class: Optional[StrictStr] = Field(default=None, alias="_class") additional_properties: Dict[str, Any] = {} __properties = ["_class"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/color.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/color.py index 4dee9419ab7..8500a75d832 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/color.py @@ -30,11 +30,11 @@ class Color(BaseModel): RGB array, RGBA array, or hex string. """ # data type: List[int] - oneof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(None, description="RGB three element array with values 0-255.") + oneof_schema_1_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=3, min_items=3)] = Field(default=None, description="RGB three element array with values 0-255.") # data type: List[int] - oneof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(None, description="RGBA four element array with values 0-255.") + oneof_schema_2_validator: Optional[conlist(conint(strict=True, le=255, ge=0), max_items=4, min_items=4)] = Field(default=None, description="RGBA four element array with values 0-255.") # data type: str - oneof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(None, description="Hex color string, such as #00FF00.") + oneof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(default=None, description="Hex color string, such as #00FF00.") if TYPE_CHECKING: actual_instance: Union[List[int], str] else: diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/danish_pig.py index 206f5855046..640a2efec2a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/danish_pig.py @@ -25,7 +25,7 @@ class DanishPig(BaseModel): """ DanishPig """ - class_name: StrictStr = Field(..., alias="className") + class_name: StrictStr = Field(default=..., alias="className") size: StrictInt = Field(...) additional_properties: Dict[str, Any] = {} __properties = ["className", "size"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/discriminator_all_of_super.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/discriminator_all_of_super.py index 67bca0597ed..df865b56b21 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/discriminator_all_of_super.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/discriminator_all_of_super.py @@ -30,7 +30,7 @@ class DiscriminatorAllOfSuper(BaseModel): """ DiscriminatorAllOfSuper """ - element_type: StrictStr = Field(..., alias="elementType") + element_type: StrictStr = Field(default=..., alias="elementType") additional_properties: Dict[str, Any] = {} __properties = ["elementType"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py index 8a06dc2f0cf..7595ca66738 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py @@ -34,10 +34,10 @@ class EnumTest(BaseModel): enum_integer_default: Optional[StrictInt] = 5 enum_integer: Optional[StrictInt] = None enum_number: Optional[StrictFloat] = None - outer_enum: Optional[OuterEnum] = Field(None, alias="outerEnum") - outer_enum_integer: Optional[OuterEnumInteger] = Field(None, alias="outerEnumInteger") - outer_enum_default_value: Optional[OuterEnumDefaultValue] = Field(None, alias="outerEnumDefaultValue") - outer_enum_integer_default_value: Optional[OuterEnumIntegerDefaultValue] = Field(None, alias="outerEnumIntegerDefaultValue") + outer_enum: Optional[OuterEnum] = Field(default=None, alias="outerEnum") + outer_enum_integer: Optional[OuterEnumInteger] = Field(default=None, alias="outerEnumInteger") + outer_enum_default_value: Optional[OuterEnumDefaultValue] = Field(default=None, alias="outerEnumDefaultValue") + outer_enum_integer_default_value: Optional[OuterEnumIntegerDefaultValue] = Field(default=None, alias="outerEnumIntegerDefaultValue") additional_properties: Dict[str, Any] = {} __properties = ["enum_string", "enum_string_required", "enum_integer_default", "enum_integer", "enum_number", "outerEnum", "outerEnumInteger", "outerEnumDefaultValue", "outerEnumIntegerDefaultValue"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/file.py index f45b5114f2c..536288cb54a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/file.py @@ -25,7 +25,7 @@ class File(BaseModel): """ Must be named `File` for test. # noqa: E501 """ - source_uri: Optional[StrictStr] = Field(None, alias="sourceURI", description="Test capitalization") + source_uri: Optional[StrictStr] = Field(default=None, alias="sourceURI", description="Test capitalization") additional_properties: Dict[str, Any] = {} __properties = ["sourceURI"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/format_test.py index 5363f631196..eb58bc67ef2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/format_test.py @@ -36,12 +36,12 @@ class FormatTest(BaseModel): string_with_double_quote_pattern: Optional[constr(strict=True)] = None byte: Optional[Union[StrictBytes, StrictStr]] = None binary: Optional[Union[StrictBytes, StrictStr]] = None - var_date: date = Field(..., alias="date") - date_time: Optional[datetime] = Field(None, alias="dateTime") + var_date: date = Field(default=..., alias="date") + date_time: Optional[datetime] = Field(default=None, alias="dateTime") uuid: Optional[StrictStr] = None password: constr(strict=True, max_length=64, min_length=10) = Field(...) - pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.") - pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") + pattern_with_digits: Optional[constr(strict=True)] = Field(default=None, description="A string that is a 10 digit number. Can have leading zeros.") + pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(default=None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") additional_properties: Dict[str, Any] = {} __properties = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/health_check_result.py index ec2c401c363..aeb92fcd824 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/health_check_result.py @@ -25,7 +25,7 @@ class HealthCheckResult(BaseModel): """ Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. # noqa: E501 """ - nullable_message: Optional[StrictStr] = Field(None, alias="NullableMessage") + nullable_message: Optional[StrictStr] = Field(default=None, alias="NullableMessage") additional_properties: Dict[str, Any] = {} __properties = ["NullableMessage"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/inner_dict_with_property.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/inner_dict_with_property.py index f3a50b0851b..8b51675279e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/inner_dict_with_property.py @@ -25,7 +25,7 @@ class InnerDictWithProperty(BaseModel): """ InnerDictWithProperty """ - a_property: Optional[Dict[str, Any]] = Field(None, alias="aProperty") + a_property: Optional[Dict[str, Any]] = Field(default=None, alias="aProperty") additional_properties: Dict[str, Any] = {} __properties = ["aProperty"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/list_class.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/list_class.py index 5dd77934371..28a3ae597eb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/list_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/list_class.py @@ -25,7 +25,7 @@ class ListClass(BaseModel): """ ListClass """ - var_123_list: Optional[StrictStr] = Field(None, alias="123-list") + var_123_list: Optional[StrictStr] = Field(default=None, alias="123-list") additional_properties: Dict[str, Any] = {} __properties = ["123-list"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/map_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/map_of_array_of_model.py index e4f7160a32a..e2c1cb4f788 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/map_of_array_of_model.py @@ -26,7 +26,7 @@ class MapOfArrayOfModel(BaseModel): """ MapOfArrayOfModel """ - shop_id_to_org_online_lip_map: Optional[Dict[str, conlist(Tag)]] = Field(None, alias="shopIdToOrgOnlineLipMap") + shop_id_to_org_online_lip_map: Optional[Dict[str, conlist(Tag)]] = Field(default=None, alias="shopIdToOrgOnlineLipMap") additional_properties: Dict[str, Any] = {} __properties = ["shopIdToOrgOnlineLipMap"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/mixed_properties_and_additional_properties_class.py index 9345c5b2ab6..2c63d575bc2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -27,7 +27,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): MixedPropertiesAndAdditionalPropertiesClass """ uuid: Optional[StrictStr] = None - date_time: Optional[datetime] = Field(None, alias="dateTime") + date_time: Optional[datetime] = Field(default=None, alias="dateTime") map: Optional[Dict[str, Animal]] = None additional_properties: Dict[str, Any] = {} __properties = ["uuid", "dateTime", "map"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model200_response.py index 63c69743338..9748057408f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model200_response.py @@ -26,7 +26,7 @@ class Model200Response(BaseModel): Model for testing model name starting with number # noqa: E501 """ name: Optional[StrictInt] = None - var_class: Optional[StrictStr] = Field(None, alias="class") + var_class: Optional[StrictStr] = Field(default=None, alias="class") additional_properties: Dict[str, Any] = {} __properties = ["name", "class"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model_return.py index a7212e506b6..8d6497a1125 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/model_return.py @@ -25,7 +25,7 @@ class ModelReturn(BaseModel): """ Model for testing reserved words # noqa: E501 """ - var_return: Optional[StrictInt] = Field(None, alias="return") + var_return: Optional[StrictInt] = Field(default=None, alias="return") additional_properties: Dict[str, Any] = {} __properties = ["return"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/name.py index 180e06e24c5..183604e4a14 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/name.py @@ -27,8 +27,8 @@ class Name(BaseModel): """ name: StrictInt = Field(...) snake_case: Optional[StrictInt] = None - var_property: Optional[StrictStr] = Field(None, alias="property") - var_123_number: Optional[StrictInt] = Field(None, alias="123Number") + var_property: Optional[StrictStr] = Field(default=None, alias="property") + var_123_number: Optional[StrictInt] = Field(default=None, alias="123Number") additional_properties: Dict[str, Any] = {} __properties = ["name", "snake_case", "property", "123Number"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/number_only.py index 78a00af5654..398bb70c2cb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/number_only.py @@ -25,7 +25,7 @@ class NumberOnly(BaseModel): """ NumberOnly """ - just_number: Optional[StrictFloat] = Field(None, alias="JustNumber") + just_number: Optional[StrictFloat] = Field(default=None, alias="JustNumber") additional_properties: Dict[str, Any] = {} __properties = ["JustNumber"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_to_test_additional_properties.py index 21e9a30d7df..b8df7a0128e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_to_test_additional_properties.py @@ -25,7 +25,7 @@ class ObjectToTestAdditionalProperties(BaseModel): """ Minimal object # noqa: E501 """ - var_property: Optional[StrictBool] = Field(False, alias="property", description="Property") + var_property: Optional[StrictBool] = Field(default=False, alias="property", description="Property") additional_properties: Dict[str, Any] = {} __properties = ["property"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_with_deprecated_fields.py index fda4435b8be..58e174846e9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/object_with_deprecated_fields.py @@ -28,7 +28,7 @@ class ObjectWithDeprecatedFields(BaseModel): """ uuid: Optional[StrictStr] = None id: Optional[StrictFloat] = None - deprecated_ref: Optional[DeprecatedObject] = Field(None, alias="deprecatedRef") + deprecated_ref: Optional[DeprecatedObject] = Field(default=None, alias="deprecatedRef") bars: Optional[conlist(StrictStr)] = None additional_properties: Dict[str, Any] = {} __properties = ["uuid", "id", "deprecatedRef", "bars"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/order.py index 691eb04bbb1..34a39fe0aa9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/order.py @@ -26,10 +26,10 @@ class Order(BaseModel): Order """ id: Optional[StrictInt] = None - pet_id: Optional[StrictInt] = Field(None, alias="petId") + pet_id: Optional[StrictInt] = Field(default=None, alias="petId") quantity: Optional[StrictInt] = None - ship_date: Optional[datetime] = Field(None, alias="shipDate") - status: Optional[StrictStr] = Field(None, description="Order Status") + ship_date: Optional[datetime] = Field(default=None, alias="shipDate") + status: Optional[StrictStr] = Field(default=None, description="Order Status") complete: Optional[StrictBool] = False additional_properties: Dict[str, Any] = {} __properties = ["id", "petId", "quantity", "shipDate", "status", "complete"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent.py index d597e8c4e44..0907f8a9752 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent.py @@ -26,7 +26,7 @@ class Parent(BaseModel): """ Parent """ - optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") + optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict") additional_properties: Dict[str, Any] = {} __properties = ["optionalDict"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent_with_optional_dict.py index fa23256f5c6..ce4d274bee4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/parent_with_optional_dict.py @@ -26,7 +26,7 @@ class ParentWithOptionalDict(BaseModel): """ ParentWithOptionalDict """ - optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") + optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(default=None, alias="optionalDict") additional_properties: Dict[str, Any] = {} __properties = ["optionalDict"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/pet.py index 25743a7ef09..89f8066ed16 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/pet.py @@ -30,9 +30,9 @@ class Pet(BaseModel): id: Optional[StrictInt] = None category: Optional[Category] = None name: StrictStr = Field(...) - photo_urls: conlist(StrictStr, min_items=0, unique_items=True) = Field(..., alias="photoUrls") + photo_urls: conlist(StrictStr, min_items=0, unique_items=True) = Field(default=..., alias="photoUrls") tags: Optional[conlist(Tag)] = None - status: Optional[StrictStr] = Field(None, description="pet status in the store") + status: Optional[StrictStr] = Field(default=None, description="pet status in the store") additional_properties: Dict[str, Any] = {} __properties = ["id", "category", "name", "photoUrls", "tags", "status"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/property_name_collision.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/property_name_collision.py index b5314f3d63e..355b3b2cd11 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/property_name_collision.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/property_name_collision.py @@ -25,9 +25,9 @@ class PropertyNameCollision(BaseModel): """ PropertyNameCollision """ - underscore_type: Optional[StrictStr] = Field(None, alias="_type") + underscore_type: Optional[StrictStr] = Field(default=None, alias="_type") type: Optional[StrictStr] = None - type_with_underscore: Optional[StrictStr] = Field(None, alias="type_") + type_with_underscore: Optional[StrictStr] = Field(default=None, alias="type_") additional_properties: Dict[str, Any] = {} __properties = ["_type", "type", "type_"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_model_name.py index 1c9804d5b4a..c9e8872aac4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_model_name.py @@ -25,7 +25,7 @@ class SpecialModelName(BaseModel): """ SpecialModelName """ - special_property_name: Optional[StrictInt] = Field(None, alias="$special[property.name]") + special_property_name: Optional[StrictInt] = Field(default=None, alias="$special[property.name]") additional_properties: Dict[str, Any] = {} __properties = ["$special[property.name]"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_name.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_name.py index 51d955951d4..e19e49e199a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/special_name.py @@ -26,9 +26,9 @@ class SpecialName(BaseModel): """ SpecialName """ - var_property: Optional[StrictInt] = Field(None, alias="property") - var_async: Optional[Category] = Field(None, alias="async") - var_schema: Optional[StrictStr] = Field(None, alias="schema", description="pet status in the store") + var_property: Optional[StrictInt] = Field(default=None, alias="property") + var_async: Optional[Category] = Field(default=None, alias="async") + var_schema: Optional[StrictStr] = Field(default=None, alias="schema", description="pet status in the store") additional_properties: Dict[str, Any] = {} __properties = ["property", "async", "schema"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_inline_freeform_additional_properties_request.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_inline_freeform_additional_properties_request.py index c61f52a3e9e..09dc01dbd97 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_inline_freeform_additional_properties_request.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_inline_freeform_additional_properties_request.py @@ -25,7 +25,7 @@ class TestInlineFreeformAdditionalPropertiesRequest(BaseModel): """ TestInlineFreeformAdditionalPropertiesRequest """ - some_property: Optional[StrictStr] = Field(None, alias="someProperty") + some_property: Optional[StrictStr] = Field(default=None, alias="someProperty") additional_properties: Dict[str, Any] = {} __properties = ["someProperty"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py index 9a2568cfab7..1b3fa10031b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py @@ -26,7 +26,7 @@ class UnnamedDictWithAdditionalModelListProperties(BaseModel): """ UnnamedDictWithAdditionalModelListProperties """ - dict_property: Optional[Dict[str, conlist(CreatureInfo)]] = Field(None, alias="dictProperty") + dict_property: Optional[Dict[str, conlist(CreatureInfo)]] = Field(default=None, alias="dictProperty") additional_properties: Dict[str, Any] = {} __properties = ["dictProperty"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py index 71bacbbaf92..d9db4ee370c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py @@ -25,7 +25,7 @@ class UnnamedDictWithAdditionalStringListProperties(BaseModel): """ UnnamedDictWithAdditionalStringListProperties """ - dict_property: Optional[Dict[str, conlist(StrictStr)]] = Field(None, alias="dictProperty") + dict_property: Optional[Dict[str, conlist(StrictStr)]] = Field(default=None, alias="dictProperty") additional_properties: Dict[str, Any] = {} __properties = ["dictProperty"] diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/user.py index 365c77ceb14..89b813092a7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/user.py @@ -27,12 +27,12 @@ class User(BaseModel): """ id: Optional[StrictInt] = None username: Optional[StrictStr] = None - first_name: Optional[StrictStr] = Field(None, alias="firstName") - last_name: Optional[StrictStr] = Field(None, alias="lastName") + first_name: Optional[StrictStr] = Field(default=None, alias="firstName") + last_name: Optional[StrictStr] = Field(default=None, alias="lastName") email: Optional[StrictStr] = None password: Optional[StrictStr] = None phone: Optional[StrictStr] = None - user_status: Optional[StrictInt] = Field(None, alias="userStatus", description="User Status") + user_status: Optional[StrictInt] = Field(default=None, alias="userStatus", description="User Status") additional_properties: Dict[str, Any] = {} __properties = ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"]