springdoc / springdoc-openapi

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
3.24k stars 489 forks source link

Pet Store shown instead own API documentation #1720

Closed christianhahnsft22 closed 2 years ago

christianhahnsft22 commented 2 years ago

Hi !

I'm trying to get my API documentation shown by default but it always starts with the pet store and not my api which is available on http://localhost:8080/v3/api-docs/ I already tried to disable the petstore using springdoc.swagger-ui.disable-swagger-default-url=true without success. If I do a curl on http://localhost:8080/swagger-ui.html it redirects directly to http://localhost:8080/swagger-ui/index.html which contains then the reference to the petstore

    <script>
    window.onload = function() {
      // Begin Swagger UI call region
      const ui = SwaggerUIBundle({
        url: "https://petstore.swagger.io/v2/swagger.json",
        dom_id: '#swagger-ui',
        deepLinking: true,
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ],
        layout: "StandaloneLayout"
      });
      // End Swagger UI call region

      window.ui = ui;
    };
  </script>
bnasslahsen commented 2 years ago

Provide a Minimal, Reproducible Example - with HelloController that reproduces the problem