我已经在K8s中部署了quarkus服务,并在入口控制器后面运行。我能够在浏览器中到达Swagger UI,但我在发送Rest请求时遇到问题,因为名称空间从URL中删除。我的Ingress配置如下
第一个月path: /{{ namespace }}(/|$)(.*)
个
我可以从外部使用CURL命令发送Rest请求。openapi-path是默认的:/q/openapi和http.root-path使用默认配置。是否需要包含任何额外的配置来启用Swagger UI请求?
我已经在K8s中部署了quarkus服务,并在入口控制器后面运行。我能够在浏览器中到达Swagger UI,但我在发送Rest请求时遇到问题,因为名称空间从URL中删除。我的Ingress配置如下
第一个月path: /{{ namespace }}(/|$)(.*)
个
我可以从外部使用CURL命令发送Rest请求。openapi-path是默认的:/q/openapi和http.root-path使用默认配置。是否需要包含任何额外的配置来启用Swagger UI请求?
1条答案
按热度按时间kqlmhetl1#
您需要将服务器详细信息添加到
1.注解(https://download. eclipse.org/microprofiles/microprofile-open-API-2.0/microprofile-openapi-spec-2.0.html#_servers)或
1.在配置
quarkus.smallrye-openapi.servers
您可能还需要进行一些CORS配置,请访问https://quarkus.io/guides/http-reference#cors-filter