ktor-swagger icon indicating copy to clipboard operation
ktor-swagger copied to clipboard

basePath/Server setup

Open devrimaksakal opened this issue 5 years ago • 1 comments

Is there a way to specify the basePath or server. Once you host this behind an api gateway, api calls from swagger lacking the base path. Can display the swagger gui with no issues, by setting forwardRoot to false

  • apigateway route is: http://{apigatewayhost}/xxx forwards to http://{swaggerhost}

  • end point is http://{swaggerhost}/users

  • you would want swagger to call: http://{apigatewayhost}/xxx/users which would forward to http://{swaggerhost}/users

  • but it calls http://{apigatewayhost}/users

so it fails. I believe, basePath setup can fix this

thanks in advance...

devrimaksakal avatar Apr 23 '20 18:04 devrimaksakal

I don't think I ever put in this capability. Please open a PR, with a test, if this is something you need.

JLLeitschuh avatar Jun 15 '20 19:06 JLLeitschuh