-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for extensions of primitive datatypes #6
Comments
I've implemented generation for primitive types here #12 It generates |
Unfortunately, pydantic treats all fields starting with an underscore as private and does not validate them. Also, looks like there are no workarounds, because I propose another solution then:
I'm not sure that it's implementable, but I'm going to try |
I rethought the suggested approach and it makes the primitive extension model supreme over the primitive types, it's totally wrong because it forces us to use extensions. Also, the suggested approach has issues with type checking, e.g. I want to develop the initial idea - since the underscore prefix is forbidden to use, let's use the underscore suffix, e.g. |
Having |
Just for the history, earlier I had experiments with inheriting primitive data classes from
Even though it works and type checked, it adds a lot of mystery behind it, e.g. |
I had this validation error when parsing the profiles of the mcode IG:
This has something to do with extensions on primitive data types. In this case an extension of targetProfile
Probably, the library is missing support for extensions on primitive datatypes as specified here:
https://build.fhir.org/json.html#primitive
The text was updated successfully, but these errors were encountered: