openapi tools generator vs swagger codegen
Asked Answered
E

3

55

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?

Equestrian answered 21/10, 2019 at 8:51 Comment(0)
S
49

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.

Spermic answered 28/10, 2019 at 22:26 Comment(0)
B
21

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.

Bield answered 7/12, 2020 at 13:14 Comment(1)
On can clearly see from openhub comparison that since 2018 Swagger Codegen isn't as nearly as active as before. And all the activity commits and PRs are now on OpenAPI Generator project. I am using OpenAPI Generator.Learning
C
7

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.

Cointreau answered 3/6, 2020 at 16:26 Comment(3)
I ended up writing my own generators from that point on. Actually if somebody needs something to be generated in a specific format, don't hesitate to contact me.Equestrian
I gave up with openapigen and swagger. Both a bit rotten and overblown. Given it took me 5hrs to write my own codegen that does 100% of what I need without the hassle of these products I can't advise their use. I do use the swagger parser lib but the rest of my gen is a bit of easy groovy code in a gradle pluginJazzy
Do you mean gRPC Remote Procedure Calls?Hotbed

© 2022 - 2024 — McMap. All rights reserved.