OpenAPI-Specification VS grpc-web

Compare OpenAPI-Specification vs grpc-web and see what are their differences.

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
OpenAPI-Specification grpc-web
44 33
28,166 8,285
0.9% 1.0%
8.6 6.5
7 days ago 18 days ago
JavaScript JavaScript
Apache License 2.0 Apache License 2.0
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.

OpenAPI-Specification

Posts with mentions or reviews of OpenAPI-Specification. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-06.
  • Writing type safe API clients in TypeScript
    3 projects | dev.to | 6 Jan 2024
    And I'll be using the OpenAPI Pet Store spec file as an example.
  • Show HN: OpenAPI DevTools – Chrome ext. that generates an API spec as you browse
    17 projects | news.ycombinator.com | 25 Oct 2023
    I saw your sibling comment about "keeping it simple," however that is a bit counter to "generates OpenAPI specifications" since those for sure are not limited to just application/json request/response bodies

    I wanted to draw your attention to "normal" POST application/x-www-form-urlencoded <https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/vers...> and its multipart/form-data friend <https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/vers...>

    The latter is likely problematic, but the former is in wide use still, including, strangely enough, the AWS API, although some of their newer services do have an application/json protocol

    I know that's a lot of words, but the tl;dr would be that if you want your extension to be application/json only, then changing the description to say "OpenAPI specifications for application/json handshakes" would help the consumer be on the same page with your goals

  • How to Connect a FastAPI Server to PostgreSQL and Deploy on GCP Cloud Run
    7 projects | dev.to | 26 May 2023
    Since FastAPI is based on OpenAPI, at this point you can also use the automatically generated docs. There are multiple options, and two are included by default. Try them out by accessing the following URLs:
  • Write a scalable OpenAPI specification for a Node.js API
    2 projects | dev.to | 19 Apr 2023
    This approach requires a constant context switch and is clearly not productive. Here, the OpenAPI Specification can help; you might already have it, but is it scalable? In this article, we’ll learn how to create an OpenAPI Specification document that is readable, scalable, and follows the principle of extension without modifying the existing document.
  • OpenAPI 3.1 - The Gnarly Bits
    4 projects | dev.to | 3 Apr 2023
    Phil Sturgeon, who along with Ben Hutton and Henry Andrews from the JSON Schema community, helped drive the push to full JSON Schema Draft 2020-12 compliance, has written a blog post for the official OpenAPIs.org website on how to transition your OAS documents from v3.0.x to v3.1.0.
  • Documenting Node.js API using Swagger
    2 projects | dev.to | 20 Mar 2023
    In this article, we will be learning how to document API written in Node.js using a tool called Swagger. Swagger allows you to describe the structure of your APIs so that machines can read them. The ability of APIs to describe their own structure is the root of all awesomeness in Swagger. Why is it so great? Well, by reading our API’s structure, swagger can automatically build beautiful and interactive API documentation. It can also automatically generate client libraries for your API in many languages and explore other possibilities like automated testing. Swagger does this by asking our API to return a YAML or JSON that contains a detailed description of your entire API. This file is essentially a resource listing of our API which adheres to OpenAPI Specifications.
  • Getting started with REST APIs
    2 projects | dev.to | 19 Dec 2022
    You may encounter APIs described as RESTful that do not meet these criteria. This is often the result of bottom-up coding, where top-down design should have been used. Another thing to watch out for is the absence of a schema. There are alternatives, but OpenAPI is a common choice with good tools support. If you don't have a schema, you can create one by building a Postman collection.
  • Automatic request validation at the edge with OpenAPI and Fastly
    3 projects | dev.to | 24 Nov 2022
    The principle behind the OpenAPI Specification (OAS – the industry’s most popular API specification format) is similar. It’s supposed to act as a blueprint for describing RESTful APIs.
  • How would I describe a webhook, as part of my API collection?
    3 projects | /r/api | 7 Nov 2022
    OpenAPI 3.1 supports webhooks. It's not widely supported yet by implementations, but it's definitely there. https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.1/webhook-example.yaml
  • Better Fastly API clients with OpenAPI Generator
    10 projects | dev.to | 1 Nov 2022
    The Fastly API is huge. We have lots of customers who want to interact with it using their chosen programming language but our small set of manually maintained clients was not sufficient to handle the job of our ever-evolving API. We needed a way to scale up our API client support, and OpenAPI was the answer.

grpc-web

Posts with mentions or reviews of grpc-web. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-14.
  • Ask HN: WebSocket server transforming channel subscriptions to gRPC streams
    2 projects | news.ycombinator.com | 14 Aug 2023
    * Additionally, client can stream data to the backend server (if bidirectional GRPC streams are used). I.e. client sends WebSocket messages, those will be transformed to GRPC messages by WebSocket server and delivered to the application backend.

    As a result we have a system which allows to quickly create individual streams by using strict GRPC contract but terminating connections over WebSocket transport. So it works well in web browsers. After that no need to write WebSocket protocol, client implementation, handle WebSocket connection. This all will be solved by a suggested WebSocket server and its client SDKs.

    The mechanics is similar to Websocketd (https://github.com/joewalnes/websocketd), but instead of creating OS processes we create GRPC streams. The difference from grpc-web (https://github.com/grpc/grpc-web) is that we provide streaming capabilities but not exposing GRPC contract to the client - just allowing to stream any data as payload (both binary and text) with some wrappers from our client SDKs side for managing subscriptions. I.e. it's not native GRPC streams on the client side - we expose just Connection/Subscription object to stream in both directions. GRPC streams used only for communication between WebSocket server and backend. To mention - grpc-web does not support all kinds of streaming now (https://github.com/grpc/grpc-web#streaming-support) while proposed solution can. This all should provide a cross-platform way to quickly write streaming apps due to client SDKs and language-agnostic nature of GRPC.

    I personally see both pros and cons in this scheme (without concentrating on both too much here to keep the question short). I spent some time thinking about this myself, already have some working prototypes – but turned out need more opinions before moving forward with the idea and releasing this, kinda lost in doubts.

    My main question - whether this seems interesting for someone here? Do you find this useful and see practical value?

  • Build and Deploy a gRPC-Web App Using Rust Tonic and React
    7 projects | dev.to | 19 Jul 2023
    By default, web browsers do not support gRPC, but we will use gRPC-web to make it possible.
  • Lemmy v0.18.0 Release - A reddit alternative written in Rust.
    2 projects | /r/rust | 23 Jun 2023
    You just have to use a library implementation for JavaScript https://github.com/grpc/grpc-web
  • Full Stack Forays with Go and gRPC
    5 projects | dev.to | 5 Jun 2023
    TypeScript support remains an experimental feature of gRPC.
  • Seeking Opinion: Choosing Between Gateway and Envoy Proxy for Our Microservices Architecture
    1 project | /r/SoftwareEngineering | 2 Jun 2023
  • Introducing Tempo: low latency, cross-platform, end-to-end typesafe APIs
    12 projects | /r/programming | 2 May 2023
    The gRPC-Web protocol supports HTTP/1 and can be used from a browser.
  • gRPC on the client side
    9 projects | dev.to | 16 Mar 2023
    -- grpc-web
  • Introduction to gRPC
    1 project | dev.to | 12 Mar 2023
    gRPC is mainly used in server-to-server communication, but it can also be used in client-to-server communication. gRPC-web is a gRPC implementation for web browsers. It is a JavaScript library that allows you to call gRPC services from a web browser. It supports Unary and Streaming Server API calls.
  • gRPC vs REST: Comparing API Styles in Practice
    6 projects | dev.to | 21 Feb 2023
    Since we're using Envoy, there's one more neat trick that we can employ. It turns out that Envoy also support gRPC-Web out of the box, a JavaScript client designed to support gRPC communication from the browser! That means that we can send gRPC messages over HTTP/1.1 as base64 encoded strings or as binary protobufs. Messages will be sent through our proxy and on to our backend service. The advantage of this is smaller and more efficient wire communication which should lead to better performance.
  • Understanding gRPC Concepts, Use Cases & Best Practices
    9 projects | dev.to | 15 Jan 2023
    protoc-gen-grpc-web — a plugin that allows our front end to communicate with the backend using gRPC calls. A separate blog post on this coming up in the future.

What are some alternatives?

When comparing OpenAPI-Specification and grpc-web you can also consider the following projects:

Cypress - Fast, easy and reliable testing for anything that runs in a browser.

ngx-grpc - Angular gRPC framework

supertest - 🕷 Super-agent driven library for testing node.js HTTP servers using a fluent API. Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.

grpc-over-webrtc - gRPC over WebRTC

grpc-gateway - gRPC to JSON proxy generator following the gRPC HTTP spec

grpcurl - Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers

api-guidelines - Microsoft REST API Guidelines

buf - The best way of working with Protocol Buffers.

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

webrpc - webrpc is a schema-driven approach to writing backend services for modern Web apps and networks

redoc - 📘 OpenAPI/Swagger-generated API Reference Documentation

evans - Evans: more expressive universal gRPC client