I'm trying to use a relative URL to the spec.yaml file, which fails because it's interpreted as a file path:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/sphinx/cmdline.py", line 304, in main
app.build(args.force_all, filenames)
File "/usr/lib/python3.6/site-packages/sphinx/application.py", line 331, in build
self.builder.build_update()
File "/usr/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 338, in build_update
'out of date' % len(to_build))
File "/usr/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 402, in build
self.finish()
File "/usr/lib/python3.6/site-packages/sphinx/builders/html.py", line 621, in finish
self.finish_tasks.add_task(self.gen_additional_pages)
File "/usr/lib/python3.6/site-packages/sphinx/util/parallel.py", line 50, in add_task
res = task_func()
File "/usr/lib/python3.6/site-packages/sphinx/builders/html.py", line 648, in gen_additional_pages
for pagename, context, template in pagelist:
File "/usr/lib/python3.6/site-packages/sphinxcontrib/redoc.py", line 47, in render
os.path.join(specpath, specname))
File "/usr/lib/python3.6/site-packages/sphinx/util/osutil.py", line 165, in copyfile
if not path.exists(dest) or not filecmp.cmp(source, dest):
File "/usr/lib/python3.6/filecmp.py", line 51, in cmp
s1 = _sig(os.stat(f1))
FileNotFoundError: [Errno 2] No such file or directory: '/api/rest/spec.yaml'
I need to use a relative path because the generated docs will be deployed on multiple hosts, and I don't want to bind the spec to a specific host. As a workaround I'm using the full URL in the config, then edit the generated html file manually before deployment.