21 comments

[ 3.7 ms ] story [ 67.2 ms ] thread
Looks interesting

My current way of achieving codegen sdk w openapi is using the readme/api sdk framework maker, if you have good specs it works pretty great.

Add tests to the sdk, and you're both testing your openapi implementation, docs, and sdk in one test

I searched for what you're describing here, and I don't believe I found the service you're describing - I'm not seeing how it could generate code.

Would you mind expanding on what you're talking about here? It sounds intriguing, I'm just not following.

I see this is an alternative to open api, but reading through the site docs, I’m not clear on what it’s adding. There’s a number is code gen tools already for open api.
What does this do better than OpenAPI? OpenAPI has many code generators. And more importantly: Many servers support it, making it really easy to implement.

So why would I chose this? How do I even implement it on the server? There's a lot of talk about client libraries, even with OpenAPI as an output format (nice!), but what about the server side?

Don't see much of a reason to use it, its also important to mention that code generation goes both ways. You can generate the schema from a service in FastAPI or Spring and generate the client code from that schema. There are already existing code and schema generators for almost every strongly typed language and web framework, including Go, Scala, Typescript, Java and Rust.

You never have to actually write any OpenAPI schema yourself nowadays.

This also doesn't seem to address the one problem I always had with OpenAPI: Polymorphic types. Mapping an OpenAPI schema between strongly typed languages like Scala or TypeScript. OpenAPI 3 supports this now with discriminators but most code or schema generators aren't supporting this very well or at all yet.

https://swagger.io/docs/specification/data-models/inheritanc...

I share the pain of things not supporting discriminated unions. I had to do some very hacky things to make it work for the API I’m developing at the moment. When it does work though it is very very nice
This is reinventing the type introspection features of GraphQL.
Do we really need another api spec? What does this do better than swagger?

Very disingenuous to compare this to an LLM, it has none of the advantages and fails to differentiate itself from many preceding peers.

> Our goal is to remove the need to develop custom client SDKs for an REST API.

Aren't there enough tools already for OpenAPI to do this?

Yes. And the tooling is pretty straightforward to plug into generally if you need to tweak things. I’ve found that the biggest barrier here is generally not in openapi tooling, but in getting people to take time out to leverage it. This is one of those places that having lots of options and alternatives typically makes things worse.
to be fair a lot of them are absolutely terrible. The top .NET one seems to be maintained by very unprofessional amateurs, has ~> 1000 open issues, some open for years, and definitely doesn't do multipart encoding correctly. Not that problem would be solved by having yet another spec.
Yeah the .NET ecosystem around openapi is horrible. I at least want the typescript client story to be good
> Yeah the .NET ecosystem (...) is horrible

:-)

That's how it felt when I was developing for it. But that's because I was interested in cool new things, not decade-old, establish enterprise stuff.

I suppose it has changed a bit in recent years, but it still doesn't exactly follow trends very enthusiastically. Which can be a good thing. But also means tooling around legitimately useful new things can be quite lacking.

I wouldn’t consider REST API tech to be very trendy, it’s kind of old wave and I would expect a good story for it.
This one doesn't even mention .NET in the generators.
We went into another direction, leveraging the existing ecosystem instead of re-inventing the wheel. Although I appreciate the effort of improving the DX for REST APIs, I think the OpenAPI ecosystem is very strong and established.

Contrary to this approach, we (https://WunderGraph.com) ingest one or more OpenAPI and GraphQL apis and combine them into a backend for frontend. We have code generators for all major frontend frameworks, like react, svelte, Vue, solid, astro, etc... These don't just make calling APIs type-safe but also handle authentication, etc...

The BFF approach allows us to securely inject API keys or add a middleware using Typescript.

I'm curious what people think of this approach. Our users don't usually integrate one or two APIs but rather 20 or more. I guess it would be quite expensive if you had to write a custom specification for each service.