Skip to content

Swagger-UI hangs when expanding operation #10616

@ogerardin

Description

@ogerardin

Q&A (please complete the following information)

  • OS: Windows
  • Browser: Chrome
  • Version: 141
  • Method of installation: webjar
  • Swagger-UI version: 5.29.3
  • Swagger/OpenAPI version: OpenAPI 3.1

Content & configuration

We have a fairly large OpenAPI file (330 K) generated by springdoc-openapi, which I can't share for confidentiality reasons. The models are generated from complex Java classes that present indirect circular references.

No customization on the Swagger-UI side.

Describe the bug you're encountering

The Swagger-UI page loads normally (although slowly), but when expanding certain operations, the page becomes unresponsive until Chrome offers to kill it.

To reproduce...

Steps to reproduce the behavior:

  1. Load the Swagger-UI page
  2. Click on an operation to expand it
  3. page becomes unresponsive

Expected behavior

Obviously I expect the operation details to be displayed so I can interact with it, or a message that explains that there is an issue with my OpenAPI file, should it be the case.

Screenshots

View of the operation right after clicking on it:
Image

Chrome tasks panel:
Image

Additional context or thoughts

On a suggestion I checked "pause on exception" in the Chrome developer dev tools, I observe that the following two exceptions alternate.

Exception 1:
Image

Exception 2 (with a different value of s each time)
Image

I suspect the problem is related to the circular nature of the model, but I can't change it as it is part of a corporate shared library.

I've seen similar issues raised but not exactly the same, and none that offered a solution.

Thanks for any help.

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