Springdoc-openapi: Gradle plugin for springdoc-openapi

Created on 28 Jan 2020  路  13Comments  路  Source: springdoc/springdoc-openapi

Hi Team,

First apologies to create this request as an issue.

After reading through your FAQ's I came to know that there is no gradle plugin for generating openapi spec like you have it for maven.

I read through your README's, Contributing guide and FAQ's I couldn't find a way to contact you guys regarding this request. Hence I created it as an issue.

I would like to contribute a gradle plugin for springdoc-open api.

Could you please help me create a project here in the springdoc sections and I will push in the gradle plugin.

Thanks
Regards
Ramesh

Most helpful comment

Hi @bnasslahsen

Thanks a lot :)

I have started working on it. It will be ready in a day or 2.

Thank you again for your support

Regards
Ramesh

All 13 comments

Hi @kpramesh2212,

The following project is created:

Hi @bnasslahsen

Thanks a lot :)

I have started working on it. It will be ready in a day or 2.

Thank you again for your support

Regards
Ramesh

How is it going? Any update on your work @kpramesh2212 ?

Hi @TLiese

I have almost completed the plugin and its in my repository https://github.com/kpramesh2212/springdoc-openapi-gradle-plugin

There is one problem that I am having at the moment.

The plugin can start spring boot server and write the openapi.json file. However after that its unable to shutdown the server

So I am trying to use a process api that would start and stop the server during task runtime.

I also have to update the REAMDE file.

Currently I work full time in my office. Will have look at solving the shutdown problem this week end.

Thanks alot for asking :)

Hi @kpramesh2212,

On the maven plugin side, we have combined it with spring-boot-maven-plugin which already integrated the process api, logic for stoping and starting the application.

Also, we needed that the application is started with the property spring.application.admin.enabled = true, which create the admin beans.

Wish that helps.

@bnasslahsen @TLiese

I finally did it.

I have a full functional working gradle plugin. Fully automatic without any manual steps

At present I am doing some cleanups and I am writing the README docs for it.

After that I will push the plugin to the repository.

Regards
Ramesh

Thank you @kpramesh2212 for your contribution.
Really apreciated :+1:

@bnasslahsen @TLiese

I have added the readme file and commited a working plugin.

More is on its way.

One more question that I need to ask is
The plugin binary needs to be added to the gradle plugin portal can I do that now are would you like to wait and do it later.

@bnasslahsen @TLiese

Its time to release the plugin to the gradle plugin portal

What do you think?

Hi @kpramesh2212,

Thank you for your contribution
I have added some changes to the plugin.
I have just done some basic tests, that are OK. I guess we can release it.
I will be more confident, if someone else who is familiar with gradle tests it as well.

Hi All,

Sorry for the delay

image

I have uploaded the plugin to gradle plugin portal and its awaiting approval from a gradle engineer.

Regards
Ramesh

So the plugin is finally in the gradle plugin portal

https://plugins.gradle.org/plugin/org.springdoc.openapi-gradle-plugin

Thank you @kpramesh2212 for your contribution.
The project url is the following: https://github.com/springdoc/springdoc-openapi-gradle-plugin.
And the plugin is available on gradle portal.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andygoossens picture andygoossens  路  6Comments

amorenew picture amorenew  路  5Comments

kfirfer picture kfirfer  路  5Comments

riimeik picture riimeik  路  4Comments

pLotoniC picture pLotoniC  路  6Comments