DSL allow to expose OpenAPI contract when application is being executed following "code first" approach.
However, I would like to build pipelines based on source code where "contract first" approach quite well, but in DSL case I don't have contract available.
One of scenarios I may want to implement is to create gradle task to extract openapi.json file into local file and run pipelines against that file (for example, can trigger vaildation and publish new openapi contract as artifact if only changes in contract detected).
Is there any way to achieve it?
PS: as one of improvements in that direction it is possible to create ktor-swagger-ui-gradle-plugin to extract openapi spec from ktor project/module and place it into resources folder during compilation instead of doing it in runtime. It will allow to avoid having extra dependencies in runtime.
sry, this plugin was not originally built to support generation when at "compile-time" and i don't think i have the time to implement this functionality
DSL allow to expose OpenAPI contract when application is being executed following "code first" approach.
However, I would like to build pipelines based on source code where "contract first" approach quite well, but in DSL case I don't have contract available.
One of scenarios I may want to implement is to create gradle task to extract
openapi.json
file into local file and run pipelines against that file (for example, can trigger vaildation and publish new openapi contract as artifact if only changes in contract detected).Is there any way to achieve it?
PS: as one of improvements in that direction it is possible to create
ktor-swagger-ui-gradle-plugin
to extract openapi spec from ktor project/module and place it intoresources
folder during compilation instead of doing it in runtime. It will allow to avoid having extra dependencies in runtime.