# grpc-ecosystem/grpc-gateway

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/grpc-ecosystem-grpc-gateway).**

19,930 stars · 2,377 forks · Go · BSD-3-Clause

## Links

- GitHub: https://github.com/grpc-ecosystem/grpc-gateway
- Homepage: https://grpc-ecosystem.github.io/grpc-gateway/
- awesome-repositories: https://awesome-repositories.com/repository/grpc-ecosystem-grpc-gateway.md

## Topics

`go` `grpc` `grpc-gateway` `openapi` `rest-api` `restful-api` `swagger`

## Description

This project is a REST-to-gRPC API gateway and JSON reverse proxy that translates RESTful HTTP requests into gRPC service calls. It functions as a protocol buffer proxy generator, providing the tools necessary to bridge JSON-based HTTP traffic with backend gRPC servers.

The system distinguishes itself by automating the creation of reverse-proxy servers and stubs through protobuf-driven code generation. It also includes a dedicated OpenAPI specification generator that produces OpenAPI v2 and v3 documents from gRPC service definitions and annotations.

The project covers a broad range of integration capabilities, including JSON-to-gRPC transcoding, request and response handling, and binary body processing. It supports advanced routing via annotation-based mapping, field-mask-based partial updates, and newline-delimited stream serialization for HTTP delivery.

Additional utility areas include observability through distributed trace propagation and health check endpoints, security controls to disable HTTP method overrides, and the ability to multiplex HTTP and gRPC traffic on a shared network port.

## Tags

### Networking & Communication

- [gRPC API Gateways](https://awesome-repositories.com/f/networking-communication/grpc-api-gateways.md) — Provides a single entry point that translates external HTTP JSON traffic into internal gRPC service communication.
- [JSON Transcoding](https://awesome-repositories.com/f/networking-communication/grpc-interfaces/grpc-web-bridging/json-transcoding.md) — Translates RESTful HTTP requests into gRPC calls by mapping URL parameters and JSON bodies to protobuf messages.
- [HTTP-to-gRPC Transcoding](https://awesome-repositories.com/f/networking-communication/http-to-grpc-transcoding.md) — Converts RESTful HTTP requests into gRPC service calls using a generated reverse-proxy server. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/examples/))
- [gRPC JSON Reverse Proxies](https://awesome-repositories.com/f/networking-communication/grpc-json-reverse-proxies.md) — Translates RESTful HTTP requests into gRPC service calls based on protocol buffer definitions.
- [JSON API Proxies](https://awesome-repositories.com/f/networking-communication/json-api-proxies.md) — Routes HTTP requests to backend services while managing the serialization and deserialization of JSON payloads.
- [REST-to-gRPC Gateways](https://awesome-repositories.com/f/networking-communication/rest-to-grpc-gateways.md) — Maps HTTP paths and query parameters to gRPC messages for exposing backend services as REST APIs.
- [Distributed Trace Propagation](https://awesome-repositories.com/f/networking-communication/distributed-trace-propagation.md) — Passes tracing spans from incoming HTTP requests through to backend services using standard headers. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/operations/tracing/))
- [Multi-Protocol Port Multiplexing](https://awesome-repositories.com/f/networking-communication/multi-protocol-port-multiplexing.md) — Shares a single network port between a server, a reverse proxy, and custom handlers. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/examples/))

### Data & Databases

- [Protobuf-Based Proxy Generation](https://awesome-repositories.com/f/data-databases/api-generators/interface-based-proxy-generators/protobuf-based-proxy-generation.md) — Translates RESTful HTTP requests into gRPC calls by generating a proxy server from protocol buffer definitions. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/tutorials/generating_stubs/))
- [REST to gRPC Mapping](https://awesome-repositories.com/f/data-databases/graphql-integrations/rest-to-graphql-translation/rest-to-grpc-mapping.md) — Translates HTTP requests into gRPC service calls using protocol buffer annotations or external configs. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/grpc_api_configuration/))
- [REST-to-gRPC Translation](https://awesome-repositories.com/f/data-databases/graphql-integrations/rest-to-grpc-translation.md) — Converts RESTful HTTP requests into gRPC service calls using a reverse-proxy server generated from protocol definitions. ([source](https://cdn.jsdelivr.net/gh/grpc-ecosystem/grpc-gateway@main/README.md))
- [Field Masks](https://awesome-repositories.com/f/data-databases/data-access-querying/database-apis/field-masks.md) — Uses field masks to specify exactly which fields to update in a resource during HTTP PATCH operations.
- [Newline-Delimited JSON Streams](https://awesome-repositories.com/f/data-databases/streaming-parsers/json/newline-delimited-json-streams.md) — Maps gRPC server streams to newline-delimited JSON streams for compatible HTTP delivery. ([source](https://cdn.jsdelivr.net/gh/grpc-ecosystem/grpc-gateway@main/README.md))

### Development Tools & Productivity

- [OpenAPI Specification Generators](https://awesome-repositories.com/f/development-tools-productivity/openapi-configurations/documentation-generators/openapi-specification-generators.md) — A tool that produces OpenAPI v2 and v3 JSON documents from gRPC service definitions and annotations.
- [Protobuf-to-Go Generators](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/code-generation/schema-driven-code-generators/protobuf-to-go-generators.md) — Generates a reverse-proxy server in Go by analyzing protocol buffer files.
- [Service Stub Generators](https://awesome-repositories.com/f/development-tools-productivity/static-type-generators/service-stub-generators.md) — Automatically generates the boilerplate code and service stubs required to bridge HTTP traffic to gRPC servers. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/tutorials/generating_stubs/using_buf/))
- [Proxy Stubs](https://awesome-repositories.com/f/development-tools-productivity/static-type-generators/service-stub-generators/proxy-stubs.md) — Produces source code stubs that bridge HTTP and gRPC based on protocol buffer annotations. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/tutorials/adding_annotations/))
- [Proxy Boilerplate Generators](https://awesome-repositories.com/f/development-tools-productivity/type-safe-binding-generators/server-boilerplate-generators/proxy-boilerplate-generators.md) — Creates the boilerplate and stubs needed to bridge JSON-based HTTP traffic with gRPC servers.
- [API Error Handling](https://awesome-repositories.com/f/development-tools-productivity/api-error-handling.md) — Allows overriding default error responses to transform payloads and strip sensitive data from routing failures. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/development/grpc-gateway_v2_migration_guide/))

### Software Engineering & Architecture

- [Annotation-Based Route Mapping](https://awesome-repositories.com/f/software-engineering-architecture/annotation-based-route-mapping.md) — Maps HTTP paths and methods to gRPC services using custom options embedded in protocol buffer definitions.
- [Partial Update Strategies](https://awesome-repositories.com/f/software-engineering-architecture/partial-update-strategies.md) — Implements partial update strategies using field masks during HTTP PATCH operations. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/patch_feature/))

### Web Development

- [REST to gRPC Translation](https://awesome-repositories.com/f/web-development/api-management-tools/api-request-handling/rest-to-grpc-translation.md) — Converts incoming HTTP API calls into gRPC service requests by mapping URL paths and query parameters. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/development/grpc-gateway_v2_migration_guide/))
- [gRPC Service Mapping](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-request-handling/grpc-service-mapping.md) — Provides the mapping logic that links RESTful endpoints to their corresponding gRPC service implementations. ([source](https://cdn.jsdelivr.net/gh/grpc-ecosystem/grpc-gateway@main/README.md))
- [Header-to-Metadata Mapping](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-utilities/http-header-manipulators/header-to-metadata-mapping.md) — Translates incoming HTTP request headers into gRPC client metadata and converts server metadata back into response headers. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/))
- [OpenAPI Specification Generators](https://awesome-repositories.com/f/web-development/restful-apis/documentation-schemas/openapi-specification-generators.md) — Automatically derives OpenAPI specifications from gRPC service definitions and protobuf message types. ([source](https://cdn.jsdelivr.net/gh/grpc-ecosystem/grpc-gateway@main/README.md))
- [gRPC Metadata Transformation](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-utilities/http-header-manipulators/http-request-header-inspectors/grpc-metadata-transformation.md) — Intercepts HTTP requests and responses to translate headers into gRPC metadata and vice versa.
- [Binary Body Processing](https://awesome-repositories.com/f/web-development/binary-body-processing.md) — Processes raw request and response bodies using binary message types to bypass standard JSON serialization. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/development/grpc-gateway_v2_migration_guide/))
- [Dynamic Response Statuses](https://awesome-repositories.com/f/web-development/dynamic-response-statuses.md) — Controls the HTTP status code returned to the client by intercepting gRPC metadata. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/))
- [Query Parameter Parsers](https://awesome-repositories.com/f/web-development/query-parameter-parsers.md) — Translates complex or nested HTTP query parameters into specific gRPC request message fields using custom parsing. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/using_custom_query_parser/))
- [Protobuf-to-OpenAPI Mappers](https://awesome-repositories.com/f/web-development/restful-apis/documentation-schemas/openapi-frameworks/rust-to-openapi-schema-mappers/protobuf-to-openapi-mappers.md) — Translates protocol buffer messages and enums into OpenAPI component schemas, including support for 64-bit integers. ([source](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/openapi_v3/))

### Part of an Awesome List

- [RPC Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/rpc-frameworks.md) — Reverse proxy to expose gRPC as RESTful APIs.
