Closed EDDragonWolf closed 2 years ago
Yeah, nice idea. However, I would propose setting those defines via cmake cache-variables so they are easy to set and handle.
Do you mean to add their definitions to the CMakeList.txt
file and remove it from the header files?
For example, add something like this
add_compile_definitions(
# Default root path to the Swagger
SWAGGER_ROOT_PATH="/swagger"
# Default path suffix to the Swagger UI
SWAGGER_UI_PATH="/ui"
)
and remove
#ifndef SWAGGER_ROOT_PATH
#define SWAGGER_ROOT_PATH "/swagger"
#endif
#ifndef SWAGGER_UI_PATH
#define SWAGGER_UI_PATH "/ui"
#endif
Yes, and have the paths be set as a cached variable so they behave like cmake-options.
https://stackoverflow.com/questions/8709877/cmake-string-options
Added, please, take a look
Proposal: I think it'll be a useful option to allow changing the default Swagger UI path (
/swagger/ui
) during the server configuration.Usage example: