From 530fc8ff3f3c788473304b15f600b75ac553b978 Mon Sep 17 00:00:00 2001 From: Vinny Do Date: Sun, 14 Jun 2020 23:46:49 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20JSON=20Schema=20"not"=20ke?= =?UTF-8?q?yword=20(#1548)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/openapi/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi/openapi/models.py b/fastapi/openapi/models.py index 13dc59f18..809286327 100644 --- a/fastapi/openapi/models.py +++ b/fastapi/openapi/models.py @@ -112,7 +112,7 @@ class SchemaBase(BaseModel): allOf: Optional[List[Any]] = None oneOf: Optional[List[Any]] = None anyOf: Optional[List[Any]] = None - not_: Optional[List[Any]] = Field(None, alias="not") + not_: Optional[Any] = Field(None, alias="not") items: Optional[Any] = None properties: Optional[Dict[str, Any]] = None additionalProperties: Optional[Union[Dict[str, Any], bool]] = None @@ -133,7 +133,7 @@ class Schema(SchemaBase): allOf: Optional[List[SchemaBase]] = None oneOf: Optional[List[SchemaBase]] = None anyOf: Optional[List[SchemaBase]] = None - not_: Optional[List[SchemaBase]] = Field(None, alias="not") + not_: Optional[SchemaBase] = Field(None, alias="not") items: Optional[SchemaBase] = None properties: Optional[Dict[str, SchemaBase]] = None additionalProperties: Optional[Union[Dict[str, Any], bool]] = None