If you supply a complex base type as part of the request message, the TypeRegistry doesn't know how to resolve any derived types.
This PR updates the TypeRegistry to check the assembly the base type is in as well as any extra assemblies provided during setup for any derived types.
Results
I chose to implement a new TypeRegistryBuilder to allow consumers to configure the built-in type registry without having to create their own (similar to how we can configure the Message Serializer as part of the HalibutRuntimeBuilder.
We also only look for ExportedTypes() in the assemblies, so types that are private/protected/internal are not registered.
I've added some unit tests to cover the new serialization behaviour.
Shortcut story: [sc-62805]
How to review this PR
Quality :heavy_check_mark:
Pre-requisites
[ ] I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
[ ] I have considered informing or consulting the right people, according to the ownership map.
[x] I have considered appropriate testing for my change.
Background
If you supply a complex base type as part of the request message, the
TypeRegistry
doesn't know how to resolve any derived types.This PR updates the
TypeRegistry
to check the assembly the base type is in as well as any extra assemblies provided during setup for any derived types.Results
I chose to implement a new
TypeRegistryBuilder
to allow consumers to configure the built-in type registry without having to create their own (similar to how we can configure the Message Serializer as part of theHalibutRuntimeBuilder
.We also only look for
ExportedTypes()
in the assemblies, so types that areprivate/protected/internal
are not registered.I've added some unit tests to cover the new serialization behaviour.
Shortcut story: [sc-62805]
How to review this PR
Quality :heavy_check_mark:
Pre-requisites