redocly-cli
redocly-cli copied to clipboard
Support a configurable version of redoc.standalone.js for preview-docs
Is your feature request related to a problem? Please describe.
At times, the latest version of the redoc.standalone.js
bundle can contain bugs. This is the situation right now, with 2.0.0-rc.72, which has several bugs. Preview-docs references https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js
, with no option to override it.
Describe the solution you'd like
An additional optional parameter to specify the standalone.js version.
For example redocly preview-docs ./petstore.yaml --standalone-version=2.0.0-rc.58
This would result in https://cdn.jsdelivr.net/npm/[email protected]/bundles/redoc.standalone.js
being used instead of https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js
.
Describe alternatives you've considered I have not found other good alternatives. When publishing the documentation, we can always point to the desired version, but we would like to have the same experience when designing and testing the documentation using preview-docs.
Additional context The affected code is to be found here: https://github.com/Redocly/redocly-cli/blob/67c53ee8e75a6ca002d6aaaa889adcca0507d8bd/packages/cli/src/commands/preview-docs/preview-server/preview-server.ts#L37
@austpaul thank you for feature suggestion! We consider to implement this in the future.
Side note: @austpaul have you reported the bugs in rc.72 or are existing bug issues opened?
Side note: @austpaul have you reported the bugs in rc.72 or are existing bug issues opened?
Hi. Not completely sure if all issues are already registered. I recognised these, so did not register my own. https://github.com/Redocly/redoc/issues/2044 https://github.com/Redocly/redoc/issues/2040 https://github.com/Redocly/redoc/issues/2066
There might be another issue which could be solved by this one, but not sure. I will create an example definition file and create a ticket to be sure. https://github.com/Redocly/redoc/issues/2042
@adamaltman I have registered an additional bug report for redoc. https://github.com/Redocly/redoc/issues/2079
Thanks @austpaul -- looks like we fixed that yesterday.