Skip to content

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

Closed

Description

@Ekimik

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

Activity

  1. sudodoki commented on Jul 22, 2020

    @sudodoki

    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!

  2. sudodoki commented on Jul 22, 2020

    @sudodoki

    Oh, I guess this is duplicate of #6249

  3. hkosova commented on Jul 22, 2020

    @hkosova
    Contributor

    @Ekimik can you please try v3.30.2?

  4. woostundy commented on Jul 23, 2020

    @woostundy

    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.

  5. Ekimik commented on Jul 23, 2020

    @Ekimik
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions