Replies: 2 comments
-
Related discussion here, since being able to add arbitrary annotations might solve one piece of this fable-compiler/Fable.Python#48 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Since it would be difficult to get things like discriminated unions and string enums working with pedantic, I'm going a different route for now of generating the json schema using a myriad plugin. |
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
-
Is there any pattern for generating a type that is annotated in a way that is usable by pydantic. Some libraries rely on it for generating a schema by calling
model_json_schema
on the type. Pydantic defines its own dataclasses, but the docs say that it has some compatibility with stdlib dataclasses:https://docs.pydantic.dev/latest/concepts/dataclasses/#usage-of-stdlib-dataclasses-with-basemodel
I've tried a few combinations to generate a class that it likes, but haven't yet been able to get it to recognize its properties.
Beta Was this translation helpful? Give feedback.
All reactions