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
Support .redocly.yaml for options for redoc-cli #1785
Comments
Same question here. I'm currently switching between openapi and redoc-cli to validate/bundle/publish because I do not know where the HTML is after It would we great to be able to output the bundled HTML to a given folder. |
So the Using js-yaml I have this setup working: A script file to convert yaml to json. // preDocs.js
const yaml = require('js-yaml');
const fs = require('fs');
// Get document, or throw exception on error
try {
const redocly = yaml.safeLoad(fs.readFileSync('.redocly.yaml', 'utf8'));
const docsConfig = redocly.referenceDocs;
fs.writeFileSync('.redoc.json', JSON.stringify(docsConfig, null, 2));
}
catch (e) {
console.log(e);
} # Bundle Docs
node preDocs.js && redoc-cli bundle api.v0.yaml --options .redoc.json And add Adding these to package.json makes it much easy: "scripts": {
"predocs": "node preDocs.js",
"docs": "redoc-cli bundle api.v0.yaml --options .redoc.json",
"docs:preview": "openapi preview-docs api.v0.yaml"
} I can do |
@rohit-gohri Both packages can serve preview. |
Same issue here, is there any plan to support |
Yes. We plan to add support. |
Hello,
When I preview docs with
openapi preview-docs
, it uses the theme defined in my.redocly.yaml
file. Is there a way to render a static HTML file, much likeredoc-cli bundle
, that reads the theme from that file?The text was updated successfully, but these errors were encountered: