swagger-gradle-codegen
swagger-gradle-codegen copied to clipboard
OpenAPI 3.0 compatibility
It could be a good thing if the builder could parse OpenAPI 3.0 swagger json file
https://swagger.io/docs/specification/about/
It could be a good thing if the builder could parse OpenAPI 3.0 swagger json file
Hey @joaobiriba
Thanks for the request. Ideally we should bump the Swagger Codegen version we are using to 3.x
.
Unfortunately this introduces a lot of breaking changes with the current KotlinGenerator class. (ping @macisamuele )
So ideally is something that will be implemented but not in the near future. We're welcoming external contributors anyway :)
Ok, let's see if I can found some time to work on it. This helped me to save some time, I could give back :)
So at this time the plugin does not support OpenAPI 3? Or is it json specifically? EDIT: Thanks @cortinico for swift reply
So at this time the plugin does not support OpenAPI 3? Or is it json specifically?
Correct, at this time the plugin doesn't support OpenAPI 3. We might achieve this by bumping the swagger-codegen
dependency to 3.x but we still have to investigate the amount of work needed.
It has been a while since the last comment on this thread. Has any work been done to bump Swagger Codegen to OpenAPI 3.0? Thanks.
Has any work been done to bump Swagger Codegen to OpenAPI 3.0? Thanks.
Not on my end. I'm unsure if @macisamuele did some work on that front.
I've looked into it long time ago (sorry for that) and seems that moving to the latest io.swagger:swagger-codegen (which supports openapi v3) might require some effort and it might interfere a bit (due to templating conflicts) with #103 . I've sync a bit with @cortinico and we thought that I can start doing some prep work on enabling open api v3 and then afterwards dealing with eventual conflicts.
Enabling polymorphism seems being an interesting feature (at least it is for me) but we are not getting many requests on that regard, so it does not seem wise to hold openapi v3 longer
Hi everyone, is there any updates for this request?
Sadly not. I haven't got much time to work on this recently. It's free to pick-up if someone wants to contribute. Me and @macisamuele were working on the Polymorphism support, and we would like to ship it before the OpenAPI change. Other than that, there are no major updates.
Hi, We have some idea, How much effort would take to give the support on OpenApi 3.0? I would like to use this library, but in the back-end they use OpenApi 3.0
@cortinico I would like to work on this could you maybe layout some ground tasks so that I can start?
So I suppose this lib is abandoned? :/
Unfortunately, I'm finding myself very short in free available time to actually provide a timeline on when this feature will be implemented but PRs are always welcome.
One of the major caveats that I've experienced, what I've started last time trying to update io.swagger:swagger-codegen
to the latest version, was around types and "making the code compile" (even if not 100% accurate).
This because the migration from V2 to V3 requires a non-trivial code refactor (and I was just not ready to commit to it yet).
Why is this proyect only a free time proyect, why is nobody imvesting money in the development? Or asking in another way, what are the alternatives to this? I'm new to this topic and would need to integrate a REST Api which has a openapi v3 config in a kotlin/Android proyect and I'm not knowing where to start, it seems that the swagger codegen only generates something simple if I understand it correctly and this lib would be more advanced?
So I suppose this lib is abandoned? :/
Just as a follow up: nope is not abandoned. We're doing on our free time that, as you can imagine, is extremely limited. Specifically I was working on this specific issue. The problem is that swagger-codegen
2.x => 3.x is introducing a significant number of API changes.
The result is that bumping this library and adding OpenAPI 3 support would require a significant amount of time.
If someone has time to look into this, and wants to send a PR, we'll be more than happy to review anyway 👍
Support for openAPI v3 would really be nice ;-)
Bumping for OpenAPI v3 support:)
even in 2023 still valid thing to have 👍