Skip to content

Proper way to use Enum with Pydantic & FastAPI #4967

Answered by brymon68
brymon68 asked this question in Question

You must be logged in to vote

This can be resolved. I ended up moving this changing my Palette color attribute to be that of type string, but still handle the type checking at the validator which seems to work fine.

Replies: 3 comments 1 reply

You must be logged in to vote
0 replies
Answer selected by brymon68

You must be logged in to vote
1 reply
@TijmenSimons

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants