xsdata dataclass generation from XSD with choice fields #1170
Unanswered
luisdanielsc
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.
-
How is it possible using xsdata for the generation of the model (dataclass) from an XSD with choice elements, to perform validations on those choices, so that it only allows one of them to be set?
XSD fragment
I have searched the web and found that this requirement could be validated using the
__post_init__method; but would it be possible to add some hook to xsdata, so that it automatically includes the implementation of the__post_init__method when generating the model with xsdata?Note: I am running the command from the CLI
Beta Was this translation helpful? Give feedback.
All reactions