Skip to content

Avoid calling FindOrImport on ModelInspector #2966

@ewoutkramer

Description

@ewoutkramer

When we will have manually-created classmappings, these will not necessarily be represented using their own POCO anymore (e.g. custom resources, which are represented by DynamicResource) - this means that we will need to be consistent and lookup ClassMappings by their name (which can be a custom type), not their class (which will often by one of the Dynamic types).

This also means we should avoid FindOrImport, since not everything is based on a class. This then means we cannot "import" types as we find them, but rather we should have them all (lazily) present in the ModelInspector. This is already true for all the main POCOs (since we scan the assemblies), but it might not be true for Backbone types (I am not sure).

Also, this means we will no longer be able to discover satellite types via shared types, if we only load the shared types in the modelinspector initially. I think this is a good thing, since that only causes problems: we don't know the current FHIR version if we are reflecting on a shared type. But it does place the requirement on the user that all assemblies be loaded into the ModelInspector. Which I think is only fair.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions