Replies: 1 comment
-
Can you do |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
is there a way to generate multi-value Literal? I need to create a property of type
List[typing.Literal["A", "B"]]
.So far I have this
but that generates Union of Literals. Pydantic validation then validates each entry agains both A and B and it just gets messy.
property_name: List[Union[Literal['A'], Literal['B']]]
Beta Was this translation helpful? Give feedback.
All reactions