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

AnyResources is defined multiple times. #8

Closed axelv closed 1 year ago

axelv commented 1 year ago

When using the typegen with multiple --from-bundles, you end up with multiple definitions for AnyResource. The reason for this is that the build_ast function is executed for each bundle. See cli.py#L32. I think it would be better to chain all StructureDefinitions first and then call build_ast only a single time.

m0rl commented 1 year ago

Thanks for catching the problem!