swagger-api / swagger-api/swagger-ui
Could not resolve reference: JSON Pointer evaluation failed while evaluating token "components" against an unexpected Element
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
General:
- MacOs
- Browser: Chrome, Safari, Firefox
- Method of installation: pnpm
- Swagger-UI version: 5.17.14 (swagger-ui-react)
- Swagger/OpenAPI version: 3.1.0
Content & configuration
Whenever I try to resolve a component schema:
Describe the bug you're encountering
In my current app, swagger-ui it not able to resolve references whenever an escape sequence is present in my apps query parameters (not in the spec).
This is a dublicate of #9304 . The fix in the issue does not seem to work. Api-dom is locked on version 1.0.0-alpha.10 (after the supposed fix)
To reproduce...
- Install react (with vite or similar)
- Render swagger-ui-react with any valid spec
- Add query params to your url e.g.
?activeElement=%7B"type"%3A"create_client"%7D - Refresh browser
- You now see the errors
What I have tried
- Swagger-ui instead of swagger-ui-react
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 failure in swagger-ui-react with a valid OpenAPI 3.1 spec and an escaped query parameter such as activeElement. Check how the api-dom dependency is resolved, including the reported 1.0.0-alpha.10 lock, and compare the behavior with duplicate issue #9304. Done means references resolve without errors after refreshing with the escaped query parameter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100