Search code examples
yamlswaggerswagger-ui

Swagger: Failed to load API definition. Fetch errorFailed to fetch openconfig-interfaces.yaml


Below is my files: enter image description here It works fine when opening index.html enter image description here

Error when clicking openconfig-interfaces enter image description here

error details:

{"schemaValidationMessages":[{"level":"error","message":"Can't read from file file://tt/rest_ui/openconfig-interfaces.yaml"}]}

Actually the file openconfig-interfaces.yaml is there. Any suggestion to solve this problem, thanks in advance


Solution

  • Seems to be a cross domain issue, Install the live server plugin in vscode, and then open it again