Comments (2)
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.py
def resolve(path: str, to: str = None):
import logging
import subprocess
import tempfile
from os.path import basename, join
if to is None:
basenames = basename(path).rsplit(".", maxsplit=2)
assert len(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}")
return to
redoc = [
{
"name": "My API",
"page": "my/api/index",
"spec": resolve("my/api/index.yml"),
"embed": True,
},
]
from redoc.
With tools like https://github.com/wework/speccy we can allow a list of spec and merge them into one so that the current process is good.
from redoc.
Related Issues (20)
- openapi: 3.0.1 support HOT 3
- Fails to build some targets HOT 1
- Move to sphinx-contrib organization? HOT 6
- Download YAML file too HOT 3
- TypeError('sequence item 0: expected str instance, int found',) when we do make html HOT 1
- server url is not correct HOT 4
- The generated doc don't show any exemple of request and response HOT 2
- Ordering of endpoints is random with the use of yaml library : switch to oyaml HOT 1
- Minor Issue in docs HOT 2
- No "type" specified at "/paths/~1test/post/parameters/0". Automatically detected: "object" HOT 2
- Error in docs
- No Support for OpenAPI 3.0 HOT 3
- Internationalization
- Sphinx-contrib extension error: urlopen error [Errno -3]
- Redoc page rendering only when used in toctree directive.
- Remove usage of pkg_resources
- Aborted attempted copy warning about `redoc.js`
- Default template file?
- Can't add CSS?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redoc.