Show HN: Stripe-quality API client libraries with a single button click
27 points| kurtbuilds | 3 years ago |libninja.com
If you just want Rust, reach out, and I'll create your client library at no cost, because I want to help Rust's ecosystem grow.
--
Hi HN,
I got into Rust in a big way about 9 months ago.
While the language is quickly maturing, one large gap in the ecosystem is immature or non-existent client libraries for common API services like Plaid, Stripe, Twilio, Github, Slack, and so on.
The existing openapi-generator templates create Rust libraries that don't even compile out of the box, so I started down the rabbit hole of creating a Rust-based toolchain to generate Rust client libraries based on an OpenAPI spec.
Rust is an incredible language to build codegen tools in, because of algebraic data types, Rust macro system, and Rust's incredibly powerful libraries for AST transformation (quote, syn, and more - almost solely due to dtolnay - thank you!)
Before long, I realized it's a common painpoint for API companies to maintain build pipelines, tweak openapi-generator templates, and so forth, to get client library generation working.
I added support for more languages, and soon after, Libninja was born.
If you're an API company, Libninja will generate world-class client libraries for you.
Client libraries: - help your users integrate faster (meaning you get revenue faster) - reduce the number of bug reports and support requests (because there's no ambiguity about using your API) - Give your users a phenomenal developer experience (editor autocomplete, API documentation in docstrings, and more)
PS- If you just want a Rust client, reach out, and I'll create your client library at no cost, because I want to help Rust's ecosystem grow.
jbenn|3 years ago
dflock|3 years ago
kurtbuilds|3 years ago
codegladiator|3 years ago
> Paste a URL containing a OpenAPI yaml file...
>> JSON.parse: unexpected character at line 1 column 1 of the JSON data
YAML or JSON ?
kurtbuilds|3 years ago
I was looking at the server logs - are you the payments company with abbreviation CP? It looks like there are a few errors in your OpenAPI doc that prevented the generator for working in your case - I'm sorry the error message wasn't more clear.
If you're interested, email me, kurt at libninja dot com, and I can describe the spec issues and we can chat about working together.
ezekg|3 years ago
ndimares|3 years ago
kurtbuilds|3 years ago
One tool we have under development is a tool (might end up being a chrome extension) that will analyze web requests to turn them into a spec.
There are a few tools that are similar in purpose, though I've only seen ones based on proxying, rather than chrome's network request recording.
- https://github.com/alufers/mitmproxy2swagger
- https://github.com/adafruit/openapi-mitm
bryan_cooper|3 years ago
limelight|3 years ago