Skip to content

Commit 8ec6930

Browse files
committed
fix(pydantic_partial): šŸ› Remove nullable JSON extra schema as this breaks with OpenAPIP 3.1 spec
1 parent 91e9d1f commit 8ec6930

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

ā€Žpydantic_partial/partial.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ class Something(PartialModelMixin, pydantic.BaseModel):
3737

3838
import pydantic
3939

40-
NULLABLE_KWARGS = {"json_schema_extra": {"nullable": True, "required": False}}
41-
4240
SelfT = TypeVar("SelfT", bound=pydantic.BaseModel)
4341
ModelSelfT = TypeVar("ModelSelfT", bound="PartialModelMixin")
4442

@@ -123,7 +121,6 @@ def _partial_annotation_arg(field_name_: str, field_annotation: type) -> type:
123121
field_info,
124122
default=None, # Set default to None
125123
default_factory=None, # Remove default_factory if set
126-
**NULLABLE_KWARGS, # For API usage: set field as nullable and not required
127124
),
128125
)
129126
elif recursive or sub_fields_requested:

0 commit comments

Comments
Ā (0)