Open EduardoMendes418 opened 2 years ago
Any updates on this one?
I had the same problem and have found a workaround.
My guess is that this line of code in swagger-ui is throwing the error because "url" is undefined.
let url = state.get("url")
let matchResult = url.match(/^([a-z][a-z0-9+\-.]*):/)
So to workaround the issue, I tried passing in an empty string as the url
attribute:
<SwaggerUI spec={file} url="" />
It seems to work OK and the console errors are no longer appearing. Swagger-ui docs recommend (here) not to pass in both spec and url so I don't know if there is something else that might break, that I haven't noticed yet. I would be interested to hear if this workaround is also effective for others!
Any update on the solution?
<SwaggerUI spec={file} url="" />
worked for me. No difference in my output that I can tell. 🤷
url=""
is a workaround on the problem. Is there any solution from the maintainers.
Error loading content from the uploaded file. Detail is that the content of the file is read in the frontend, below the source code and screenshot of the error
Q&A (please complete the following information)
Screenshots
Content & configuration
Source code example: