gateway-endpoint
CommunityMap REST controllers to gRPC backends
AuthorFaysilAlshareef
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill documents patterns and best practices for building REST gateway controllers that reliably delegate to gRPC backend services, preventing leaking proto types into REST responses and reducing duplicated mapping logic.
Core Features & Use Cases
- Versioned controller base: Enforce a ControllerBaseV1 that centralizes route constants and OpenAPI grouping for consistent API surface across gateways.
- Constructor-injected gRPC clients: Recommend primary constructor injection with backing readonly fields for typed gRPC clients to keep controllers thin and testable.
- Inline mapping and response models: Map gRPC responses to REST DTOs inline, use Paginated<T> for list endpoints, and wrap command results in a simple Response { Message } model.
- Error handling and security: Provide RpcException handling patterns, rely on global filters for most errors, and apply class-level Authorize attributes with Policy or Roles.
Quick Start
Add a new controller that inherits ControllerBaseV1, injects the typed gRPC client in the constructor, maps responses to REST DTOs inline, and returns Paginated<T> for list endpoints.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: gateway-endpoint Download link: https://github.com/FaysilAlshareef/dotnet-ai-kit/archive/main.zip#gateway-endpoint Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.