From a448bd63bd6d0f6c512cdede6b38fd9b675939e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=AC=E5=86=AC?= Date: Tue, 4 Feb 2020 11:37:47 +0800 Subject: [PATCH] :bug: Allow Any type for enums in OpenAPI (#906) --- fastapi/openapi/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/openapi/models.py b/fastapi/openapi/models.py index 78b9d86ae..4ca963dfc 100644 --- a/fastapi/openapi/models.py +++ b/fastapi/openapi/models.py @@ -101,7 +101,7 @@ class SchemaBase(BaseModel): maxProperties: Optional[int] = Field(None, gte=0) minProperties: Optional[int] = Field(None, gte=0) required: Optional[List[str]] = None - enum: Optional[List[str]] = None + enum: Optional[List[Any]] = None type: Optional[str] = None allOf: Optional[List[Any]] = None oneOf: Optional[List[Any]] = None