-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with rest of documentation #15
Comments
Unfortunately, I do not know how to integrate it to Sphinx properly, i.e. so you can integrate it with a toctree. Sphinx uses However, it's not true that you need to do absolute links. You can do relative (to The point of this extension is to have Sphinx as the only tool you need to produce all-in-one docs, where you have your Sphinx documentation and ReDoc-rendered OpenAPI spec. I.e. perform ReDoc bundling and spec copying when you run Sphinx to build the docs. |
An imperfect solution is to link the ReDoc rendered spec to the main documentation with, the
and then in Sphinx create a new page that links to ReDoc rendered spec in the description. Adding ReDoc rendered spec to sphinx's table of content (without passing by an intermediary page) would be ideal, and there is related discussion in sphinx-doc/sphinx#701 but with no clear solution as far as I can tell. |
What I'm just trying to do is to use the Sphinx
.. only:: html
.. _specs-details:
OpenAPI Specs Details
=====================
.. raw:: html
<script>
function resizeOpenapiElement() {
var openapiElement = document.getElementById('openapiWidget');
var parentElement = openapiElement.parentNode;
parentElement.style.width = '150%';
}
document.body.addEventListener('load', resizeOpenapiElement, true);
</script>
<div id="openapiWidget">
.. raw:: html
:file: _static/openapi.html
.. raw:: html
</div> I hope that helps already. And I'm happy as, if somebody has suggestions on how to handle this in a tidier way ... ;-) |
Another update on this: |
I tried the above |
I don't see how I can integrate the generated
api.html
into my documentation. It's just there in the documentation folder and I cannot even link to it unless I use absolute links, right? So what does this extension actually do related to Sphinx? It would be great if I could link to it from a toctree.The text was updated successfully, but these errors were encountered: