sphinx-contrib/openapi

Local file references broken on windows

Opened this issue · 0 comments

Windows 10, Python 3.9, Sphinx==3.5.3

Exception occurred:
  File "C:\Users\aye\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\jsonschema\validators.py", line 782, in resolve_from_url
    raise exceptions.RefResolutionError(exc)
jsonschema.exceptions.RefResolutionError: <urlopen error [WinError 3] The system cannot find the path specified: '\\definitions\\foo.yml'>

I am using the same test case as #3 does and getting the above error.

A little poking around shows that the base uri is being set to file://H:\projects\XXX\source\api_spec.yml and the reference is trying to resolve file://H:\projects\XXX\source\api_spec.yml/definitions/foo.yml

After getting this error I tried the latest dev versions with no changes (sphinxcontrib-openapi version 0.7.1.dev12+g4f78db9 and jsonschema-3.2.1.dev362+g833b6a9).