Live data from Hacker News

OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

github.com

31–40 of 73 posts

Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

#32
I'm not really positive about the community made generator. The spec itself is great, but that's where it stops. Code quality is low of the generated clients and servers, the handlebars templates makes it hard to develop for and don't get me started about the PR reviews. Basically nothing happens.

We've given up and started to create our own generator. Even this is a hard thing to do as the available parsers in our language are horrible too.

Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

#33
post #11
post #3

What’s the conceptual difference between this and SOAP with WSDLs?

SOAP (and XSD) were amazingly expressive and capable. They just didn't do enough to balance verboseness, simplicity, and conciseness. Amazing how much work and progress was lost when it was all thrown away for REST/JSON. JSON Schema is great but never reached the level that XSD did.

I maintain a project that converts from a specific API mostly documented in XSD to JSON schema.

For the specific API I'm interested in XSD and JSON Schema are mostly equivalent. Quite probably it isn't true in the general case.

Check out some of the test cases in this directory to get an idea how XSD can be translated into JSON Schema https://github.com/ccouzens/vcloud-rest-openapi/blob/main/tr...

Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

#34
Used OpenAPI Generator a few times and I'm happy with it.

In my latest React Native project I generate the API client and inject functions into React Query.

I know there's Orval that aims to generate React Query right away but I wasn't happy with its developer experience.

Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

#36
post #4

Earlier quoted context omitted.

I talked to a startup ( https://stainlessapi.com/ ) about a service they provide where they take an OpenAPI spec and build good SDKs on top of it. This included making sure they are idiomatic, included examples, handled exceptions (Edit: like if one SDK consumer needs a slightly different thing because they use a different, custom API, not like network or language exceptions) if needed, and some other goodness. I pas…

I prefer graphql because of this. It's a huge pain to maintain open API files and the generators are of varying quality supporting different specs. They also handle some parts differently in the output. Which generator have you used for typescript? There are 4 of them and all of them have different issues. I find the axios one the most stable but keen to know. How do you also handle refreshing token, incepting reques…

No post body was provided.

Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

#37
Disclosure: I'm a cofounder of this startup

We've been building client sdks as a service at Speakeasy (https://www.speakeasyapi.dev/). API developer experience today in REST struggles because the openapi generators are buggy and generate machine-readable stubs rather than ergonomic SDKs. We ended up building a new generator from ground up focused on ensuring we could capture idiomatic features specific to each languages. For API consumers our goal is to provide a best in class dev ex and taking the burden off of having to rewrite common boilerplate like pagination and retries. For API producers you get to focus on building your API and not have to worry about table stakes features for your users. We started a closed beta programme recently. Shoot me a message at sagar@speakeasyapi.dev or come chat with us on slack if you want to early access!

https://join.slack.com/t/speakeasy-dev/shared_invite/zt-1df0...

Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

#38
post #29

Disclosure: I'm a contributor to the project. OpenAPI Spec and auto-generated API clients are very useful when multiple languages need to be supported, like when running a developer program. I've worked at companies that both use OpenAPI Generator for official clients and ones that wrote our own tools for API client SDK generation (with different design philosophy). I've used a number of generators myself to compare…

No post body was provided.

Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

#39

Disclosure: I'm a cofounder of this startup We've been building client sdks as a service at Speakeasy ( https://www.speakeasyapi.dev/ ). API developer experience today in REST struggles because the openapi generators are buggy and generate machine-readable stubs rather than ergonomic SDKs. We ended up building a new generator from ground up focused on ensuring we could capture idiomatic features specific to each lang…

Great to see other engineers focusing on this space. I’ve spent a good chunk of my career writing in-house clients for various business critical APIs and have always had a giggle that our self-made ones were often far nicer to use than anything on the market but was always disappointed that due to a variety of corporate constraints they will never see the light of day. I can see a big benefit to bespoke hand-rolled clients with a solid developer experience so keen to see where you guys go!
Post reply on HN