Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image 3.30.1 won't load information about anything #6253

Closed
Ekimik opened this issue Jul 22, 2020 · 5 comments
Closed

Docker image 3.30.1 won't load information about anything #6253

Ekimik opened this issue Jul 22, 2020 · 5 comments

Comments

@Ekimik
Copy link

Ekimik commented Jul 22, 2020

Q&A (please complete the following information)

  • OS: Linux Mint
  • Browser: chrome
  • Version: 83
  • Method of installation: Docker
  • Swagger-UI version: v3.30.1 (Docker image tage)
  • Swagger/OpenAPI version: OpenAPI 3.0]

Content & configuration

Example Swagger/OpenAPI definition:

{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Search API"
  },
  "servers": [
    {
      "url": "..."
    }
  ],
  "paths": {
    "/status": {
      "get": {
        "summary": "API status",
        "responses": {
          "200": {
            "description": "API is fully functional"
          },
          "500": {
            "description": "API is down"
          }
        }
      }
    },
    "/search": {
      "get": {
        "summary": "Search by given params",
        "responses": {
          "200": {
            "description": "Response for given query"
          },
          "400": {
            "description": "Invalid input params supplied"
          }
        },
        "parameters": [
          {
            "name": "q",
            "description": "Query",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}

Swagger-UI configuration options:
None

Describe the bug you're encountering

This issue can relate to #6249. Everything works fine with Docker image swaggerapi/swagger-ui:v3.30.0.

To reproduce...

Steps to reproduce the behavior:

  1. Start Docker image with Swagger UI based on v3.30.1 tag, e.g.
docker run --rm --name searchapidoc -p 80:8080 -e SWAGGER_JSON=/var/cache/searchapi/searchapi.json -v <path-to-dir-with-api-definition>:/var/cache/searchapi swaggerapi/swagger-ui:v3.30.1
  1. Go to http://localhost/
  2. Click to any endpoint or schema object
  3. See error - No information from API definition are loaded

Expected behavior

Information about API should be diplayed. Take same steps as mentioned above when reproducing error behavior, but with tag v3.30.0 to see correct behavior.

Screenshots

Screen with error

@sudodoki
Copy link

I assume I'm seeing the same issue. Worst thing our api doc is using CDN script without version freeze, so it kinda broke everywhere 😅
Swagger is super useful to us, thanks for keeping it running!

@sudodoki
Copy link

Oh, I guess this is duplicate of #6249

@hkosova
Copy link
Contributor

hkosova commented Jul 22, 2020

@Ekimik can you please try v3.30.2?

@woostundy
Copy link

It casue by this CDN resource is still v3.30.1: https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui-bundle.js , and FastAPI use it.

@Ekimik
Copy link
Author

Ekimik commented Jul 23, 2020

With Docker image swaggerapi/swagger-ui:v3.30.2 everything works fine on my local machine

@tim-lai tim-lai closed this as completed Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants