swagger-gradle-codegen icon indicating copy to clipboard operation
swagger-gradle-codegen copied to clipboard

OpenAPI 3.0 compatibility

Open giolaq opened this issue 4 years ago • 18 comments

It could be a good thing if the builder could parse OpenAPI 3.0 swagger json file

https://swagger.io/docs/specification/about/

giolaq avatar Jul 23 '19 07:07 giolaq

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 :)

cortinico avatar Jul 24 '19 14:07 cortinico

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 :)

giolaq avatar Jul 24 '19 14:07 giolaq

So at this time the plugin does not support OpenAPI 3? Or is it json specifically? EDIT: Thanks @cortinico for swift reply

hybras avatar Mar 17 '20 21:03 hybras

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.

cortinico avatar Mar 17 '20 21:03 cortinico

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.

stephen-mojo avatar Oct 20 '20 17:10 stephen-mojo

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.

cortinico avatar Oct 20 '20 18:10 cortinico

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

macisamuele avatar Oct 24 '20 18:10 macisamuele

Hi everyone, is there any updates for this request?

jmgarbowski avatar Apr 16 '21 08:04 jmgarbowski

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.

cortinico avatar Apr 18 '21 20:04 cortinico

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

CristianMG avatar Jun 22 '21 08:06 CristianMG

@cortinico I would like to work on this could you maybe layout some ground tasks so that I can start?

aggarwalpulkit596 avatar Jun 23 '21 13:06 aggarwalpulkit596

So I suppose this lib is abandoned? :/

mobilekosmos avatar Oct 27 '21 17:10 mobilekosmos

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).

macisamuele avatar Oct 27 '21 19:10 macisamuele

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?

mobilekosmos avatar Oct 27 '21 20:10 mobilekosmos

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 👍

cortinico avatar Oct 31 '21 13:10 cortinico

Support for openAPI v3 would really be nice ;-)

pischky avatar May 19 '22 11:05 pischky

Bumping for OpenAPI v3 support:)

TheScriptan avatar Oct 11 '22 17:10 TheScriptan

even in 2023 still valid thing to have 👍

alex-dokienko avatar Aug 30 '23 14:08 alex-dokienko