msgpack-javascript
openapi-backend
msgpack-javascript | openapi-backend | |
---|---|---|
3 | 2 | |
1,223 | 579 | |
1.3% | 1.4% | |
4.9 | 7.7 | |
about 2 months ago | 2 months ago | |
TypeScript | TypeScript | |
ISC License | MIT License |
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.
msgpack-javascript
-
Show HN: REST Alternative to GraphQL and tRPC
For a compact message format being sent to browsers, you might look at messagepack, eg with https://github.com/msgpack/msgpack-javascript – it's essentially binary JSON, so it'd be compatible with OpenAPI specs.
I think the ser/des is slower than JSON in most browsers, but the message format is smaller.
Oftentimes, using a query parameter like `?exclude[]=…` or `?include[]=…` or similar to say "only get me these response fields, not the whole object" can be useful for this too (and then you still get JSON back).
-
How to create msgpack RPC client?
This lib seems to be well managed, with frequent changes pushed. If it is made as per the spec, it should be compliant to work with your server too. https://github.com/msgpack/msgpack-javascript
-
WTF Wednesday (January 20, 2021)
Really cool, how does it compare to something like messagepack https://github.com/msgpack/msgpack-javascript ?
openapi-backend
- Full stack typesafe API-first development for REST
-
Show HN: REST Alternative to GraphQL and tRPC
Cheers! Going from code first to schema first is definitely worth it in my experience! Especially when working in a team.
The nice thing is you already have an openapi spec, so it’s pretty trivial to eject from fastify swagger and switch to openapi-backend if you want!
Here’s an example of openapi-backend running on Fastify
https://github.com/openapistack/openapi-backend/tree/main/ex...
What are some alternatives?
cbor - TypeScript implementation of the CBOR specification
zod-to-openapi - A library that generates OpenAPI (Swagger) docs from Zod schemas
rxjs-ninja - RxJS Operators for handling Observable strings, numbers, booleans and more
openapi-client-axios - JavaScript client library for consuming OpenAPI-enabled APIs with axios