You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My (local) yml spec file references to another (local) yml in the definition. However, the extension seems not able to detect the reference and copy them.
For example:
The extension detects "path/to/a.yml" and copy it to _build/html/_spec. However, b.yml is not copied and the page just failed to load.
Could there be a way to list the yml files I want to use for rendering the docs page, and the extension will copy and prepare them (and manipulate the paths) for me?
The text was updated successfully, but these errors were encountered:
If anyone is interested, I came up with a workaround merging the files at the build time in conf.py with prance.
(speccy ran into an infinite loop with my spec file)
However, it would be good if supported in the extension.
# conf.pydefresolve(path: str, to: str=None):
importloggingimportsubprocessimporttempfilefromos.pathimportbasename, joiniftoisNone:
basenames=basename(path).rsplit(".", maxsplit=2)
assertlen(basenames) ==2# to = to or f"{path_names[0]}.resolved.{path_names[1]}"to=f"{join(tempfile.gettempdir(),basenames[0])}.resolved.{basenames[1]}"subprocess.run(["prance", "compile", path, to])
logging.getLogger(__name__).info(f"Resolved {path} to {to}")
returntoredoc= [
{
"name": "My API",
"page": "my/api/index",
"spec": resolve("my/api/index.yml"),
"embed": True,
},
]
My (local) yml spec file references to another (local) yml in the definition. However, the extension seems not able to detect the reference and copy them.
For example:
a.yml
b.yml
and in
conf.py
The extension detects
"path/to/a.yml"
and copy it to_build/html/_spec
. However,b.yml
is not copied and the page just failed to load.Could there be a way to list the yml files I want to use for rendering the docs page, and the extension will copy and prepare them (and manipulate the paths) for me?
The text was updated successfully, but these errors were encountered: