Spring boot api网关后面的Springdoc配置URL

Spring boot api网关后面的Springdoc配置URL,spring-boot,swagger-ui,openapi,springdoc,springdoc-openapi-ui,Spring Boot,Swagger Ui,Openapi,Springdoc,Springdoc Openapi Ui,我已经使用SpringCloudGatewayRoute/myapi启动并运行了springdoc swagger ui。所以当我点击网址时 https://myhost.com/myapi 它将我重定向到一个url https://myhost.com/myapi/webjars/swagger-ui/index.html?configUrl=/swagger-config.json 我的application.yml文件中有以下代码 springdoc: swagger-ui:

我已经使用SpringCloudGatewayRoute/myapi启动并运行了springdoc swagger ui。所以当我点击网址时

https://myhost.com/myapi
它将我重定向到一个url

https://myhost.com/myapi/webjars/swagger-ui/index.html?configUrl=/swagger-config.json
我的application.yml文件中有以下代码

springdoc:
  swagger-ui:
    path: /
    configUrl: /swagger-config.json
我还设置了以下属性

server.forward-headers-strategy: framework
我的问题是,为了使重定向的url在配置url中也包含API网关路由,我还需要做什么?基本上我希望重定向的url是

https://myhost.com/myapi/webjars/swagger-ui/index.html?configUrl=/myapi/swagger-config.json
不是

https://myhost.com/myapi/webjars/swagger-ui/index.html?configUrl=/swagger-config.json

我在github()上收到了该项目的一位贡献者的回复。如果我们使用默认的springdoc.swagger-ui.configUrl而不是显式指定它,那么一切都可以正常工作