swagger-api / swagger-api/swagger-ui
Try It functionality giving JavaScript error a.forEach is not a function in swagger-ui-bundle.js
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:
- Go to the API details page
- Click on Authorize
- Click Try it
- Enter client id and secret and authenticate
- Click Execute
Expected behavior
Loading screen should not appear.
Try it should result in rendered responses.
Screenshots
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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