Skip to content

Conversation

@jeff-at-trimble
Copy link
Contributor

Closes #1029

Allow service interfaces with the same short name in different namespaces to coexist on the same server by specifying a custom gRPC service name.

  • Add ServiceNameAttribute to MagicOnion.Abstractions for overriding the default interface-name-based gRPC routing path
  • Add ServiceNameHelper to resolve the service name from the attribute at runtime (dynamic client and server)
  • Update MethodCollector to resolve the service name from the attribute at source-generation time (static client)
  • Add ServiceName property to IMagicOnionServiceInfo interface
  • Validate against null/whitespace in ServiceNameAttribute constructor
  • Add unit, server, and integration tests for both unary and hub scenarios

@mayuki
Copy link
Member

mayuki commented Feb 12, 2026

Thank you for your contribution! Can I add tests for the Source Generator and commit them?

@jeff-at-trimble
Copy link
Contributor Author

jeff-at-trimble commented Feb 12, 2026 via email

Closes Cysharp#1029

Allow service interfaces with the same short name in different namespaces
to coexist on the same server by specifying a custom gRPC service name.

- Add ServiceNameAttribute to MagicOnion.Abstractions for overriding
  the default interface-name-based gRPC routing path
- Add ServiceNameHelper to resolve the service name from the attribute
  at runtime (dynamic client and server)
- Update MethodCollector to resolve the service name from the attribute
  at source-generation time (static client)
- Add ServiceName property to IMagicOnionServiceInfo interface
- Validate against null/whitespace in ServiceNameAttribute constructor
- Add unit, server, and integration tests for both unary and hub scenarios
@jeff-at-trimble jeff-at-trimble force-pushed the issue-1029/service-naming branch from d652fcd to 1c61dd2 Compare February 12, 2026 20:06
@mayuki mayuki merged commit c8e1fa5 into Cysharp:main Feb 13, 2026
5 checks passed
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.

Configure/Override Service Naming

2 participants