Skip to content
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

Avoid calling FindOrImport on ModelInspector #2966

Open
ewoutkramer opened this issue Nov 14, 2024 · 0 comments
Open

Avoid calling FindOrImport on ModelInspector #2966

ewoutkramer opened this issue Nov 14, 2024 · 0 comments

Comments

@ewoutkramer
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant