Is there a way to configure open api documentation...
# ktor
b
Is there a way to configure open api documentation when autogenerating using ktor plugin https://www.jetbrains.com/help/idea/ktor.html#openapi
Copy code
info:
  title: "swagger_poc API"
  description: "swagger_poc API"
  version: "1.0.0"
servers:
- url: "<https://swagger_poc>"
a
Unfortunately, there's no way but only by editing the generated file.
b
But it will be overwritten after new endpoints added etc. @Vadim Briliantov is there a solution for this?
v
For now, there is no solution for this in IDE. We can consider adding one in the future. But the plan is to support this on CI with Qodana + automation script. I have implemented this flow in one of the repos that I am working on, and it works pretty much like this: you create an automation script on your CI (I use Space + Space Automation) that runs Qodana with inspections and quickfixes (Qodana allows you to run IntelliJ inspections on CI, and it also provides a feature of applying quickfixes), then you have your state of your current codebase updated with the new openapi file. Then you can do any changes to it in your script (and you can also modify the file if you want — adding and replacing info header manually is also possible), and then based on the overall resulting
git diff
you can create a Merge Request to the original branch that contains the code change that you’ve just pushed. At some point I think we will publish that script or create a tutorial about that. So, if you really need to have OpenAPI consistently updated, the way is to move this to CI, and there you can modify file as you want after IJ action. But for now, we can consider providing some IDE settings for that inspection as well.