title: How to specify api docs url for swagger ui in spring boot (open api v3)?
body: <p>I have a spring boot application with open-api 3 that is deployed in Kubernetes (spring-boot-starter-parent 2.2.4.RELEASE). The rest endpoints are accessible through ingress, so URL is something like:</p>
  <pre><code>https://host/ingress-path
  </code></pre>
  <p>I have the problem that as soon as the application is deployed to ingress, api-docs are available too via:</p>
  <pre><code>https://host/ingress-path/v3/api-docs
  </code></pre>
  <p>When I open Swagger UI I have 404 because it seems like Swagger UI is looking into https://host/v3/api-docs... When I open</p>
  <pre><code>https://host/ingress-path/swagger-ui/index.html
  </code></pre>
  <p>and put <code>https://host/ingress-path/v3/api-docs</code> to 'Expore' and run it, I have all my API discovered.</p>
  <p>Can anybody suggest how to set a server for UI using some spring property, etc?</p>
  <p>Currently I have this (downloaded from https://host/ingress-path/v3/api-docs.yaml)</p>
  <pre class="lang-yaml prettyprint-override"><code>openapi: 3.0.1
  info:
    title: My API
    description: My API description
    version: v0.0.1
  servers:
  - url: https://host
    description: Generated server url
  </code></pre>
  <p>This API is autogenerated. I suppose that <code>server</code> has to have <code>url: https://host/ingress-path</code></p>
  <p>Seems like I need pathProvider with relative path, like described here:</p>
  <p><a href="https://github.com/springdoc/springdoc-openapi/issues/170" rel="nofollow noreferrer">https://github.com/springdoc/springdoc-openapi/issues/170</a></p>
  <p>But I cannot find such thing in open-api 3.</p>
  <p>Can you please help me?</p>
  <p>Thanks!</p>
  <p>P.S. I suppose that I can fix it via config:</p>
  <pre><code>springdoc:
    api-docs:
      enabled: true
      path: '/v3/api-docs'
    swagger-ui:
      path: '/swagger-ui'
      config-url: '/ingress-path/v3/api-docs/swagger-config'
      url: '/ingress-path/v3/api-docs'
      doc-expansion: none
      disable-swagger-default-url: true
  </code></pre>