swagger-api / swagger-api/swagger-ui

Try It functionality giving JavaScript error a.forEach is not a function in swagger-ui-bundle.js

Open
#10,255 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A
  • OS: Windows 10
  • Browser: Edge
  • Version: 131
  • Method of installation: composer
  • Swagger-UI version: 5.18.2
  • Swagger/OpenAPI version: OpenAPI 3.0
  • Platform: Drupal 10.3
  • Drupal module: openapi_ui 8.x-1.0-rc5
Describe the bug you're encountering

Try it functionality is throwing a JavaScript error in swagger-ui-bundle.js (check screenshot).
The loading screen appears and doesn't render any responses (check screenshot).

To reproduce...

Steps to reproduce the behavior:

  1. Go to the API details page
  2. Click on Authorize
  3. Click Try it
  4. Enter client id and secret and authenticate
  5. Click Execute
Expected behavior

Loading screen should not appear.
Try it should result in rendered responses.

Screenshots

Image
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the error through the listed Authorize and Try it steps in Swagger UI 5.18.2 on the reported Drupal 10.3 setup, then inspect swagger-ui-bundle.js at the a.forEach failure. Confirm the cause and verify that authentication completes, the loading screen clears, and responses render.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.