mirror of https://github.com/tiangolo/fastapi.git
raise error in pydantic v1
This commit is contained in:
parent
1121414bf2
commit
8472f4addf
|
|
@ -348,3 +348,7 @@ def create_body_model(
|
|||
|
||||
def get_model_fields(model: Type[BaseModel]) -> List[ModelField]:
|
||||
return list(model.__fields__.values()) # type: ignore[attr-defined]
|
||||
|
||||
def omit_by_default(field_info: FieldInfo) -> FieldInfo:
|
||||
"""add a wrap validator to omit invalid values by default."""
|
||||
raise NotImplementedError("This function is a placeholder in Pydantic v1.")
|
||||
|
|
|
|||
|
|
@ -305,7 +305,6 @@ class Query(Param): # type: ignore[misc]
|
|||
json_schema_extra=json_schema_extra,
|
||||
**extra,
|
||||
)
|
||||
self.annotation = self.annotation
|
||||
|
||||
|
||||
class Header(Param): # type: ignore[misc]
|
||||
|
|
|
|||
Loading…
Reference in New Issue