Also check out Smithy from AWS ( https://github.com/awslabs/smithy ), the code it generates is much better. It's influenced by the new AWS SDKs so it has generator support for Rust.
OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
51–60 of 73 posts
Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#52I tried using it as a Go code generator (I only needed structs and marshaler / unmarshaler helpers), but it ended up being way too difficult to use and I couldn't get it to work properly. After a bit of searching, I bumped into Deepmap's implementation https://github.com/deepmap/oapi-codegen which works great. They even added support for oneOf, anyOf and allOf which makes things a lot easier.
Would love to know if anyone else has any language specific SDK generators they'd recommend, similar to the Deepmap implementation, but for another language (ruby, python, c#, java, etc).
Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#53I’ve been trying to use this to generate sane, idiomatic Kotlin models, and am so far a little frustrated by the choices the generator makes - especially with regards to how to represent `anyOf` And `allOf` constructs. Has anyone had success with generated Kotlin? I’m also curious if there are other Kotlin generators out there.
And since the compiler can't really type check across the API boundary you still need to account for unexpected values. The difference is that the failure happens in ugly auto generated code instead of within your code where it is more easily handled.
Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#54There's an alternative technology: GraphQL, which has generators too!
Here a PoC of mine demo'ing an architecture in which the backend is very low code (mostly due to Hasura), and most of the app's code is in the frontend: an Elm app with generated type-safe Elm-bindings to the GraphQL backend.
Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#55I was very excited about this project when I first encountered it as it seemed to be the best centralized community-driven way to generate code for multiple languages and supporting v3. The more time I spent with it the more disappointed I became. The reason why you are forced to write Java and write your own generator alongside the rest of the project is unclear to me. Extending the mustache templates is a pain (and…
Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#56I tried using it as a Go code generator (I only needed structs and marshaler / unmarshaler helpers), but it ended up being way too difficult to use and I couldn't get it to work properly. After a bit of searching, I bumped into Deepmap's implementation https://github.com/deepmap/oapi-codegen which works great. They even added support for oneOf, anyOf and allOf which makes things a lot easier.
Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#57I tried using it as a Go code generator (I only needed structs and marshaler / unmarshaler helpers), but it ended up being way too difficult to use and I couldn't get it to work properly. After a bit of searching, I bumped into Deepmap's implementation https://github.com/deepmap/oapi-codegen which works great. They even added support for oneOf, anyOf and allOf which makes things a lot easier.
One of the maintainers here, thanks for sharing and that it's been great for you
Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#58Re: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
#59I tried using it as a Go code generator (I only needed structs and marshaler / unmarshaler helpers), but it ended up being way too difficult to use and I couldn't get it to work properly. After a bit of searching, I bumped into Deepmap's implementation https://github.com/deepmap/oapi-codegen which works great. They even added support for oneOf, anyOf and allOf which makes things a lot easier.
That's awesome, thanks for sharing! Would love to know if anyone else has any language specific SDK generators they'd recommend, similar to the Deepmap implementation, but for another language (ruby, python, c#, java, etc).