I've tried both the client and server generators for many languages, and the output was always unusable garbage.
It's bettee to just write your own server and use OAS for validation and type defs.
Are there any issues for these corner cases you've filed that could use more attention? I don't maintain openapi-generator but I can definitely forward them to the maintainers
Which typescript generator are you using? Do you use typescript on the backend too and if so is it easy to keep the generated type definitions in sync? Also for backend what do you use for json schema validation?
Ref: https://github.com/OpenAPITools/openapi-generator/pull/5120
Do you literally mean unusable, or it just didn't fit your stylistic preference?
I actually still haven't found a single implementation of a OAS consumer (mock server, type generator, etc.) that implements the whole spec correctly.
The intention is that people use the generators as a base, and if there's something you need that's not implemented, you write the implementation and contribute it back. No single person is going to implement 100% of the spec in their day job, so as an open source project, coverage will be patchy until enough people extend the implementation to cover their own API surface area.
I don't think "it doesn't cover the whole spec" is fair grounds for criticism (though out-of-the-box generator errors are another story).
A spec is useless if it's not fully implemented by any library. Also, I'm fine with imperfect FOSS, but it's frustrating to not know that implementation is incomplete or what exactly is missing. You end up doing trial and error.
All I'm saying is that OAS generators are not net time savers, which you supported yourself by saying that sometimes fixing an implementation is up to the user. That's not a criticism of any person, just a fact.
I've also written customized templates that removed a lot of the cruft (iirc the JS or TS generator decided to output an API client in three different flavors). Of course the problem there was that the particular generator did not have all code generation in (overridable) templates, but also some hardcoded.
If a viable API documentation tool based on raw unmodified jsonschema with some additions to be able to describe the HTTP actions and parameters, and with the ability to visualize it as documentation, came around then I'd switch in a heartbeat.
[1]: https://datatracker.ietf.org/doc/draft-handrews-json-schema-...
[2]: https://json-schema.org/implementations.html#hyper-schema
I’ve tried pretty much all GUIs that existed a year ago or so, and started with Apicurio which was good, but was missing support for oneOf, allOf and the like.
Switched to Stoplight and it has been great! Love that you can just manage your spec in a repo along with the project.
If you want to take your CI pipeline to the next level you can run it (dockerized, if you want) from a CI step to generate and commit + tag a completely separate repo to have your API SDK generation completely automated. I've written a little about the dumbest possible way you could do it (i.e. manually writing YAML)[1] for when you don't have proper framework support.
openapi-generator also has some really awesome new features and support for different languages, most recent big release was 4.0 (and most recent as of this post is 4.2.3)[2], been meaning to write a bit about that as well since their haskell support gets better and better every time. Super awesome & convenient project, the value being delivered for free is unreal.
[0]: https://github.com/OpenAPITools/openapi-generator
[1]: https://vadosware.io/post/quick-intro-to-manual-openapi-v3/
[2]: https://github.com/OpenAPITools/openapi-generator/releases