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

fix: prevent name collisions between messages and services #107

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

vchudnov-g
Copy link
Collaborator

Previously, a Discovery schema and a resource that differed only in casing would result in a proto message and service, respectively, with the same upper-camel-case name in the same namespace. This would cause downstream problems when attempting to parse the proto.

We now disambiguate such cases by suffixing the names of such conflicting services with Service.

We explicitly do NOT deal with recursive disambiguation. That is, if the first disambiguation attempt between a message and a service fails, we do not attempt to find a different suffix to continue the disambiguation. If needed, we can add this later, but for the moment it seems a good idea to flag such occurrences.

If a service has the same name as a message, we suffix the service name with "Service.
We may want to rename the test and baseline files to be more informative: .1-message.1-service, .2-message.1-server, 1.-message.2-server
@vchudnov-g vchudnov-g merged commit f531645 into main Dec 1, 2023
5 checks passed
@vchudnov-g vchudnov-g deleted the diregapic-any-not-found branch December 1, 2023 19:50
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

Successfully merging this pull request may close these issues.

2 participants