openapi3 VS grpc-gateway

Compare openapi3 vs grpc-gateway and see what are their differences.

openapi3

OpenAPI 3.0 data model (by biocad)

grpc-gateway

gRPC to JSON proxy generator following the gRPC HTTP spec (by grpc-ecosystem)
Our great sponsors
  • talent.io - Download talent.io’s Tech Salary Report
  • Scout APM - Truly a developer’s best friend
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SonarQube - Static code analysis for 29 languages.
openapi3 grpc-gateway
0 15
34 14,200
- 1.7%
5.8 9.3
about 2 months ago 5 days ago
Haskell Go
BSD 3-clause "New" or "Revised" License BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

openapi3

Posts with mentions or reviews of openapi3. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning openapi3 yet.
Tracking mentions began in Dec 2020.

grpc-gateway

Posts with mentions or reviews of grpc-gateway. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-07-26.
  • grpc gateway
    5 projects | reddit.com/r/rust | 26 Jul 2022
    like for go: https://github.com/grpc-ecosystem/grpc-gateway/
  • What do you see as the advantage of using gRPC when compared to simply sending protobuff over a rest API?
    2 projects | reddit.com/r/golang | 30 Jun 2022
    You can also automatically generate a JSON REST API adapter: https://github.com/grpc-ecosystem/grpc-gateway
  • Is it possible to write a well-typed controller/handler in Go?
    7 projects | reddit.com/r/golang | 30 Jun 2022
    gRPC + gRPC-Gateway might be what you're looking for.
  • How can I convert RESTful requests to gRPC requests in my gateway?
    4 projects | reddit.com/r/golang | 26 Jun 2022
    Take a look at https://github.com/grpc-ecosystem/grpc-gateway - should be a good starting point.
  • Do you use frameworks?
    13 projects | reddit.com/r/golang | 17 Jun 2022
    There is an example here: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/stream.proto
  • Connect, a better gRPC
    5 projects | reddit.com/r/golang | 1 Jun 2022
  • What web framework do you prefer and why?
    10 projects | reddit.com/r/golang | 26 May 2022
    There's a pretty thorough walkthrough of this approach in the readme for the grpc-gateway plugin: https://github.com/grpc-ecosystem/grpc-gateway
  • Show me your REST APIs 😊
    12 projects | reddit.com/r/golang | 15 Dec 2021
    I found that using gRPC-gateway is a really simple way to implement both a gRPC and REST server from one common set of code. The tooling can even generate Swagger docs for you. Here's an example repo: https://github.com/johanbrandhorst/grpc-gateway-boilerplate
  • gRPC for Microservices Communication
    5 projects | news.ycombinator.com | 23 Sep 2021
    There's no reason you couldn't use gRPC with json as a serialized message format. For example grpc-gateway [0] provides a very effective way of mapping a gRPC concept to HTTP/JSON. The thing is, after moving to gRPC, I've never really felt a desire to move back to JSON. While it may be correct to say "parsing json is fast enough" it's important to note that there's a "for most use cases" after that. Parsing protos is fast enough for even more use cases. You also get streams which are amazing for APIs where you have to sync some large amounts of data (listing large collections from a DB for example) across two services.

    With gRPC you also have a standardized middleware API that is implemented for "all" languages. The concepts cleanly map across multiple languages and types are mostly solved for you.

    Adding to that you can easily define some conventions for a proto and make amazing libraries for your team. At a previous job I made this: https://github.com/CaperAi/pronto/

    Made it super easy to prototype multiple services as if you mock a service backed by memory we could plop it into a DB with zero effort.

    I think this "gRPC vs X" method of thinking isn't appropriate here because protos are more like a Object.prototype in JavaScript. They're a template for what you're sending. If you have the Message you want to send you can serialize that to JSON or read from JSON or XML or another propriety format and automatically get a host of cool features (pretty printing, serialization to text/binary, sending over the network, etc).

    [0] - https://github.com/grpc-ecosystem/grpc-gateway

  • Simple Go microservices with REST, and gRPC.
    6 projects | reddit.com/r/golang | 21 Aug 2021
    Amazing job for only two weeks in! One thing to consider looking at is grpc-gateway. This lets you bake REST API's directly in your protos, with automatic route generation, allowing you to use gRPC or HTTP from the same code base.

What are some alternatives?

When comparing openapi3 and grpc-gateway you can also consider the following projects:

examples - A repository to host examples and tutorials for Gin.

MassTransit - Distributed Application Framework for .NET

Kreya - Kreya is a GUI client for REST and gRPC with innovative features for environments, authorizations and more.

OpenAPI-Specification - The OpenAPI Specification Repository

grpc-web - gRPC for Web Clients

microservices-grpc-ui - Microservices applying BFF pattern with REST, and gRPC. This repo contains the generic UI.

microservices-go-grpc - Go microservices with REST, and gRPC for demonstrating the BFF pattern. This repository contains backend services. Everything is dockerized and ready to "Go" :-)

google.aip.dev - API Improvement Proposals. https://aip.dev/

api-guidelines - Microsoft REST API Guidelines

gqlgen - go generate based graphql server library

gRPC - The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)

pronto - Protobuf ORM