Redoc: Provide versioning support for APIs?

Created on 23 Mar 2017  路  4Comments  路  Source: Redocly/redoc

Can we support multiple versions of APIs?

  • Provide a dropdown to select the correct version (perhaps next to the download button).
  • Based on the version selected, the correct swagger is loaded.

    • e.g. if v2 is selected, then teachers-swagger-v2.yaml will be loaded and displayed in the 3 panels.

  • provide option to mark certain versions as deprecated. (so that you can continue to display deprecated versions instead of removing them from the documentation altogether)

Is there some way to already do this?

Most helpful comment

That example file was removed as part of the react rewrite and is no longer in the master branch. You can still view it at: https://github.com/Rebilly/ReDoc/blob/039bbdb585f92a7e7c5d38ea5776c42d5d39480e/demo/examples/multiple-apis/index.html

All 4 comments

@gauravmokhasi you can have any switcher outside the redoc and use Redoc.init method to switch files.
Check example here: https://github.com/Rebilly/ReDoc/blob/master/demo/examples/multiple-apis/index.html

There is no plan to add this into ReDoc core.

That example file was removed as part of the react rewrite and is no longer in the master branch. You can still view it at: https://github.com/Rebilly/ReDoc/blob/039bbdb585f92a7e7c5d38ea5776c42d5d39480e/demo/examples/multiple-apis/index.html

Thanks. @RomanHotsiy, but this only shows the first API and no option to select the other versions. Please assist.

please provide this on the next major version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dwilding picture dwilding  路  4Comments

dvh picture dvh  路  3Comments

typekpb picture typekpb  路  4Comments

RamakrishnaChilaka picture RamakrishnaChilaka  路  3Comments

vietnguyen010 picture vietnguyen010  路  3Comments