fix EnumSchemaByNameMixin
This commit is contained in:
parent
aa5df7de7f
commit
ead9bb9298
1 changed files with 1 additions and 0 deletions
|
@ -22,6 +22,7 @@ class EnumSchemaByNameMixin:
|
|||
if field is None:
|
||||
return
|
||||
field_schema["enum"] = list(cast(EnumMeta, field.type_).__members__.keys())
|
||||
field_schema["type"] = "string"
|
||||
|
||||
@classmethod
|
||||
def _validate(cls, v: Any, field: ModelField) -> Any:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue