swagger-api / swagger-api/swagger-editor
Resolver error with multi-file schema definitions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.5k
- Forks
- 2.4k
- Avg merge
- 17h 15m
- Merged PRs (30d)
- 18
Description
I have 3 test YAML files (really simple and tiny), containing cross-referenced schema definitions (all of them fully resolvable).
The YAML files can be found here:
test.yaml
a.yaml
b.yaml
To reproduce the bug, we can use the latest online Swagger Editor:
https://editor.swagger.io/?url=https://jdegre.github.io/test/test.yaml
The output is as follows in the screenshot:
The errors in the "console", at the bottom-left, seem to indicate a failed attempt to retrieve files "a.yaml" and "b.yaml". Also, please note the Resolver error on the top-right side (on the Swagger UI window).
HOWEVER, the resolution of the references is, in fact, successful, as we can see on the schemas of the POST method, again on the Swagger UI window.
So, the actual bug seems to be that there are certain transient errors that stay on the screen, while I guess they shouldn't, since the resolution eventually works fine.
(This is a re-post of an old bug I posted maybe 5-6 years ago, but I thought it could be useful to re-post the issue, given the brand new architecture of Swagger Editor, and given that the bug still exists)
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 loading test.yaml in the online Swagger Editor and compare its references to a.yaml and b.yaml. Use the browser console and the Resolver error display to reproduce the transient failures while confirming that the POST schemas resolve. Done means the valid multi-file references still resolve without stale resolver errors remaining on screen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100