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

Rework type name resolves to able to change the implementation #421

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nazarii-piontko
Copy link

Description

  • Implemented a possibility to override the default implementation of IAsyncSchemaRegistryTypeNameResolver for Protobuf and Avro schemas.
  • Added TryAdd... methods to add service to the DI container if it is not there already. It is necessary to not override the customer-defined implementation of the name resolver.
  • Added interfaces IConfluentAvroTypeNameResolver and IConfluentProtobufTypeNameResolver to have the possibility to register different name resolvers for Avro and Protobuf schemas.

Fixes # (issue)

Make ConfluentProtobufTypeNameResolver more flexible on type name construction #404

How Has This Been Tested?

  • Added unit tests for the new ConfluentProtobufTypeNameResolver implementation.
  • Added unit tests for TryAdd... methods.
  • Manually tested with samples/KafkaFlow.Sample.SchemaRegistry.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have made corresponding changes to the documentation

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

var package = protoFields.Package;
if (string.IsNullOrEmpty(package))
{
package = protoFields.Options.CsharpNamespace;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Options might be null

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

Successfully merging this pull request may close these issues.

3 participants