redoc
redoc copied to clipboard
Please create a node.js api that can be used in place of the cli
You have a cli, but I would have guessed that the cli runs off of a core javascript api. Doesn't look like you publish documentation for it, and I'm wondering if a good js api even exists, when looking at how the cli is written. Its silly to have to run command line tools within a node.js build script.
Here are some docs:
https://redocly.com/docs/redoc/deployment/html/#step-2---reference-the-redoc-script https://redocly.com/docs/redoc/deployment/react/#how-to-use-the-redoc-react-component
If you have some ideas for better API, your contributions would be appreciated!
No, that is not what I'm talking about. I'm talking about a javascript api that can be used in place of the cli (ie via a node.js script). Please reopen
@RomanHotsiy
I think this issue is more related to the repository https://github.com/Redocly/redocly-cli.
It includes two libs @redocly/cli
and @redocly/openapi-core
.
@AlexVarchuk, no. It is not. They mean to implement some way to run a redoc-cli build from node.js directly.
Any updates with this?
No update. PRs are welcome.
@RomanHotsiy thank you for the response, just to know, I've noticed that in the redoc-cli documentation the keyword "bundle" refers to the "build" command. Is this the same for the @redoc/openapi-core bundle? If that is the case, we could use the "bundle" usage to generate a redoc-html from an openapi.json?
No, we're renaming "bundle" to "build" so there is no confusion between two.
redoc-cli
was replaced by Redocly CLI, which does wrap a JS library. You can find out more and see examples of how to use it here https://www.npmjs.com/package/@redocly/openapi-core