reference to an external file is unsupported
See original GitHub issueQ&A (please complete the following information)
- OS: not relevant
- Browser: not relevant
- Version: I don’t understand…
- Method of installation: docker
- Swagger-UI version: 3.25.0
- Swagger/OpenAPI version: not relevant
Content & configuration
Example Swagger/OpenAPI definition found at https://swagger.io/docs/specification/using-ref/#allowed-places :
paths:
/users:
$ref: '../resources/users.yaml'
/users/{userId}:
$ref: '../resources/users-by-id.yaml'
Describe the bug you’re encountering
References to external files seem to be unsupported
To reproduce…
Steps to reproduce the behavior:
- Open the your inspector with F12
- You should see one 404 per external file you reference
- You will also see errors in SwaggerUI
Expected behavior
Status code 200, no errors
Additional context or thoughts
This is because only the main file is linked to the document root:
Any file that is referenced is not copied to the document root. I worked around the bug by overriding the Docker command so that it does that copy before running the main process.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Unsupported external table reference, unable to derive shape ...
I'm working to create a new table from an external file in Netezza, but am getting the following error ...
Read more >Excel Online reporting unsupported features - Error Message
Specifically calling out "charts or objects with external references (links to other workbooks) is why the excel file won't open in the browser....
Read more >How to Fix Unsupported File Error on Android? - YouTube
It can be frustrating to lose a photo due to file corruption. Have you ever encountered the vexing error page that appears when...
Read more >How to Fix Unsupported File Format and Missing ... - YouTube
If you insert a USB or a memory card on your TV and the video is not playing, depending on your TV, there...
Read more >Visual studio 2019 16.0.2. The reference is invalid or ...
As mentioned in a solution, the issue appears to be related to incorrectly referencing a project's output DLL directly. Use a project reference...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@webron I have a PR that fixes this issue, been open since August 2019. https://github.com/swagger-api/swagger-ui/pull/5565
With that fix you could use volume mounts to address the problem as described in https://github.com/swagger-api/swagger-ui/issues/5966#issuecomment-615654058 like so:
PR #5565 was accepted and merged awhile back. Closing issue.