I am lost in dependencies and tools: I previously use the following tool to generate code for my swagger webservices.
swagger-codegen-cli
Then I noticed the following tool, and thought this was a successor:
openapi tools generator
But the code that is generated uses different annotations and seems older.
Could somebody tell me, are these 2 tools related to eachother and which one is the more recent version?
OpenAPI and Swagger used to refer to the same thing. While there are differences today (OpenAPI refers to RESTful API design and Swagger refers to a set of SmartBear tools), this blog will use the terms interchangeably. If you develop software today, chances are you are developing web APIs as well.
OpenAPI Generator focuses on ease of use; it positions itself as being a tool for reducing the burden on new development and technologies through the integration and leveraging of OpenAPI documents. Notably, OpenAPI Generator is a fork of swagger-codegen between versions 2.3. 1 and 2.4.
Swagger Codegen is an open source project which allows generation of API client libraries (SDK generation), server stubs, and documentation automatically from an OpenAPI Specification.
CodeGen is a tool that software developers who are working in a Synergy development environment (Synergy/DE) can use to generate source code. That code is often Synergy Language code, but could also be source code for some other programming language.
From the OpenAPI Generator FAQs
What is the difference between Swagger Codegen and OpenAPI Generator?
Swagger Codegen is driven by SmartBear while OpenAPI Generator is driven by the community. More than 40 top contributors and template creators of Swagger Codegen have joined OpenAPI Generator as the founding team members. For more details, see the Fork Q&A.
Swagger is a trademark owned by SmartBear and the use of the term "Swagger" in this project is for demo (reference) purposes only.
One way to compare open-source projects is using https://openhub.net.
e.g. OpenAPI Generator vs Swagger Codegen.
From the activity and community graphs, openapi-generator seems to be a lot more active.
Its seems that openapi is in a messy state currently. I'm also confused on which generator to use... And I want to write a custom generator.
GRPC is in a much better state. Every generator is a plugin and the core is well maintained, are the community is not forking.
Update:
Our company has agreed to keep using OpenAPI. We're now using the new OpenSource variant of OpenAPI: openapi-generator.tech/
We've extended the python generators to tweak the generated code. We're also using client generators in TypeScript and considering Kotlin and Swift for our mobile apps.
In the end it works well. If you're not ready to go binary with GRPC, OpenAPI is a nice alternative. It does requires a bit more, my experience with GRPC is that its a no-brains solution. "It Just Works".
But your miles may vary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With