Can a conversion reference other data in the model? #643
Unanswered
Ayehavgunne
asked this question in
Q&A
Replies: 0 comments
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.
-
Pydantic has this feature where you can set a default_factory that will be provided one argument which is a dict containing all the already validated fields data. You can use this to set the value of a field based on the data of another field. This is helpful in cases where the dataclass/model is frozen.
I have not been able to find a way to do the same in apischema. Is that possible?
Beta Was this translation helpful? Give feedback.
All reactions