redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

Support a configurable version of redoc.standalone.js for preview-docs

Open austpaul opened this issue 2 years ago • 5 comments

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 avatar Jun 20 '22 11:06 austpaul

@austpaul thank you for feature suggestion! We consider to implement this in the future.

SmoliyY avatar Jun 21 '22 09:06 SmoliyY

Side note: @austpaul have you reported the bugs in rc.72 or are existing bug issues opened?

adamaltman avatar Jun 28 '22 23:06 adamaltman

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

austpaul avatar Jun 29 '22 07:06 austpaul

@adamaltman I have registered an additional bug report for redoc. https://github.com/Redocly/redoc/issues/2079

austpaul avatar Jul 13 '22 10:07 austpaul

Thanks @austpaul -- looks like we fixed that yesterday.

adamaltman avatar Jul 20 '22 12:07 adamaltman