Browse Source

🐛 Allow Any type for enums in OpenAPI (#906)

pull/948/head
李冬冬 5 years ago
committed by GitHub
parent
commit
a448bd63bd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      fastapi/openapi/models.py

2
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

Loading…
Cancel
Save