beda-software / fhir-py-types

Convert FHIR StructureDefinition into Python type annotations
BSD 3-Clause "New" or "Revised" License
15 stars 1 forks source link

Use underscore suffix instead of prefix for primitive #6 #18

Open ruscoder opened 2 weeks ago

ruscoder commented 2 weeks ago

Within this PR I've changed the underscore prefix to the underscore suffix. Moreover, in the code, it was already used for keywords like for, class. See my last comment #6 for details.

Also, I've overridden the base model class changing dict() behavior to return the alias name by default. (Closes #17)

ruscoder commented 2 weeks ago

Having _ is not enough because it overlaps with reserved keywords, e.g. import_: str and import_: Element. So, I decided to adhere to fhir.resources python library where it's exposed as __ext suffix.

ruscoder commented 1 week ago

I clean up the code by merging into main small pieces: