https://kotlinlang.org logo
#ktor
Title
# ktor
f

Fernando Sanchez (Perraco Labs)

03/08/2024, 9:14 AM
Regarding the auto-generation of OpenAPI specification, I followed the steps as described in the documentation, by placing the caret over
embeddedServer
and press Alt + Enter to access the generation option. My question is, does the IDE offer the same feature when using
EngineMain.main(args)
instead of
embeddedServer
? I cannot see the option with
EngineMain
, maybe has to be done in a different manner?
a

Aleksei Tirman [JB]

03/08/2024, 10:44 AM
You can also generate the specification by running the
Generate OpenAPI Documentation for Ktor in Module: ...
action.
1
🙌 1
m

Marat Dinmukhametov

03/08/2024, 10:47 AM
Or you can also find the intention action inside the routing method
a

Aleksei Tirman [JB]

03/08/2024, 10:49 AM
It actually doesn't matter how you do it because the specification is generated module-wide.
💯 1
f

Fernando Sanchez (Perraco Labs)

03/08/2024, 11:03 AM
Great, I didn't realize that it can also be done in the module.
a

Antonio Acuña Prieto

03/10/2024, 11:46 AM
Regarding this, is possible to generate the specification from CLI instead of IDE?
a

Aleksei Tirman [JB]

03/11/2024, 7:40 AM
No, but there will be an integration with Qodana Cloud.
3 Views