openapi-typescript
protobuf
openapi-typescript | protobuf | |
---|---|---|
17 | 18 | |
4,591 | 9,648 | |
- | 0.5% | |
9.3 | 4.6 | |
3 days ago | 9 days ago | |
TypeScript | JavaScript | |
MIT License | GNU General Public License v3.0 or later |
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-typescript
- TypeSpec: A New Language for API-Centric Development
-
Writing type safe API clients in TypeScript
OpenAPI TypeScript
-
Django 5.0 Is Released
I'll preface all of this with a couple esoteric design goals that I had in mind:
1. I actually _want_ an SPA. You might not need an SPA, if you don't need one then Vue/React/etc are overkill, etc.
2. I want to power as much of the SPA as I can using the same REST API as my core product, both for dogfooding reasons and for consolidation. Many people might argue that this is a bad idea.
---
With that in mind, some specific packages that I highly recommend:
1. Django-vite (https://github.com/MrBin99/django-vite). This makes it very easy to serve an SPA from the actual django response/request model
2. Some sort of way to get type information (if you're using TypeScript) into the frontend. I use a frankensteined system of the OpenAPI spec that django-ninja generates + openapi-typescript (https://github.com/drwpow/openapi-typescript). This means when I add, say, a new field to a response in Django, I immediately get typechecking for it in Vue — which has been _tremendously_ useful.
3. Django-typescript-routes (a package I extracted and open-sourced!: https://github.com/buttondown-email/django-typescript-routes) which gives your front-end routing information based on the Django router.
- OpenAPI-TypeScript – OpenAPI schemas in TypeScript
-
Tell HN: Postman just wiped all my stuff
Glad to see alternatives but disappointed that Bruno does not support OpenAPI specification.
At my company, we hand-edit OpenAPI specs in YAML and it gets consumed by many tools that generate types[0], static analysis and dynamic checks[1]. The OpenAPI spec itself is linted[2]. And of course, Postman consumes OpenAPI.
Tools that are built on open standards will naturally see greater adoption over those that use proprietary formats.
[0]: https://openapi-ts.pages.dev
-
tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy
Another great library to generate TS types from OpenAPI is https://github.com/drwpow/openapi-typescript . It provides the types as single objects you access via indexing, which is pretty nice. There's a partner library to generate a typed fetch client.
-
How can I generate typescript types?
If you're willing to document your API with an OpenAPI schema, then it should be possible to generate TypeScript types based on the OpenAPI schema with something like openapi-typescript. Also, Typebox can generate JSON schemas, maybe it can be used to generate something that the front-end can also use?
-
Should I add Redux?
REST
-
Building a Secure Database-Centric OpenAPI in 15 Minutes
In this sample, we'll achive it using openapi-typescript and openapi-typescript-fetch.
- GRPC Gateway API Client?
protobuf
- Eval("quire".replace(/^/,"re"))(moduleName)
-
How we reverse-engineered Google Maps pagination
Google Maps URLs contain the pb parameter contains string-encoded Protobuf. The format is the same as for the data parameter in the browser URL on Google Maps. It contains !-separated values. There are several answers on StackOverflow, gists on GitHub, some blog posts about decoding, and even a kinda official guide on reverse engineering protobuf, but none of this touches pagination.
-
Add extra stuff to a “standard” encoding? Sure, why not
Seems like protoduf.js has the exact same methods as Google’s implementations with the same names (encode/decode to not prepend with length, encodeDelimited/decodeDelimited for prepending length). It is hard for me to say they’re adding to the standard when they’re just replicating Google’s libraries.
https://github.com/protobufjs/protobuf.js#toolset
-
Question about compressing JSON in multiplayer position updates
If it really is a problem, then another option is to use Protobus or Message Pack for serializing (maybe into base64?).
-
Looking for ideas on how to implement serialization and deserialization between C++ and Javascript
I use protocol buffers. protobufjs translates into json.
-
GRPC Gateway API Client?
I have tried GRPC gateway generation tools: - PBJS: https://github.com/protobufjs/protobuf.js/
- Protobuf-ES: The Protocol Buffers TypeScript/JavaScript runtime we all deserve
- Did I understand the basic concept of website development with Node Js correctly?
- how can i use protobuf with sveltekit, please?
-
is there any startup or famous web app using grpc/grpc-web for their frontend
We use https://github.com/improbable-eng/grpc-web for the server part with https://github.com/protobufjs/protobuf.js on the frontend.
What are some alternatives?
routing-controllers - Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and Routing Controllers Framework.
snappy - DEPRECATED - please use https://github.com/Brooooooklyn/snappy. Nodejs bindings to Google's Snappy compression library
remult - Full-stack CRUD, simplified, with SSOT TypeScript entities
pbf - A low-level, lightweight protocol buffers implementation in JavaScript.
proposal-decorators - Decorators for ES6 classes
compactr - Schema based serialization made easy
zod - TypeScript-first schema validation with static type inference
Vicis - Presentation and transformation layer for data output in RESTful APIs.
nestjs-openapi3 - OpenAPI 3.x document generation and serving for NestJS.
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
nestjs-auth - Comprehensive handling of authentication and authorization for NestJS.
Cap'n Proto - Cap'n Proto serialization/RPC system - core tools and C++ library