Skip to content

new SwaggerUI(...) fails with "s is not a function" error after upgrading to swagger-ui@5.28.0 #10636

@slaweet

Description

@slaweet

Q&A (please complete the following information)

  • OS: Ubuntu 22.04
  • Browser: chrome
  • Version: 142.0
  • Method of installation: npm
  • Swagger-UI version: 5.28.0
  • Swagger/OpenAPI version: Swagger 1.0, OpenAPI 2.0

Content & configuration

Here's a sandbox with a minimal reproduction using swagger-ui v5.27.1 which works as expected
https://codesandbox.io/p/devbox/swagger-ui-5-27-1-example-forked-cwkfst?workspaceId=ws_7URHuAnb4he8p4EieYcckW

Describe the bug you're encountering

And this is a copy of the above sandbox that only changes swagger-ui in package.json to v5.28.0
https://codesandbox.io/p/sandbox/eager-bessie-2mvrk4

and now I get an error instead of swagger-ui rendered

TypeError
s is not a function
Object.eval [as render]
/node_modules/swagger-ui/dist/swagger-ui-es-bundle-core.js:2:228223

To reproduce...

Steps to reproduce the behavior:

  1. Just open my reproduction: https://codesandbox.io/p/sandbox/eager-bessie-2mvrk4

Expected behavior

swagger-ui v5.28.0 works the same as v5.27.1

Screenshots

Sandbox with swagger-ui v5.27.1

Image

Sandbox with swagger-ui v5.28.0

Image

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