Redoc: How to provide multiple swagger files to ReDoc

Created on 7 Mar 2017  路  10Comments  路  Source: Redocly/redoc

Hi Expert,
I am planning to use ReDoc for api doc generation. I am very new to ReDoc. I was able to run ReDoc with single swagger file. Is there any way to provide multiple swagger files to ReDoc?

In case, if providing multiple swagger files to ReDoc is not possible, Could you please recommend a tool which works best in aggregating/merging multiple swagger files into one (for ReDoc).

Thanks in advance.

question

Most helpful comment

For everyone who use docker: I have written a Docker Image for that problem. Based on react: https://hub.docker.com/r/volbrene/redoc

All 10 comments

Hi Experts,

Did you get a chance to go through my question.

Thanks in advance for your reply.

@prverma3 what do you mean under multiple swagger files. Redoc supports references so you can use $ref to split your file into chunks.
If you want to use ReDoc with completely different swagger files then you probably should use Redoc.init (docs) method.

If you are new to swagger I recommend you our another tool: generator-openapi-repo. It will help you to setup your repo.

Many Thanks for your reply.

Actually with multiple swaggers files i was referring to multiple swaggers files of different sub projects.

The Redoc.init seems to take only single swagger spec at the time. Can you recommend any tool to merge multiple swagger files and generate a single merged swagger file . So that, we can use that single merged swagger file in ReDoc.init.

Thanks in advance for your reply.

@prverma3 Check out the sample of how to use multiple swagger files with redoc: https://github.com/Rebilly/ReDoc/blob/master/demo/examples/multiple-apis/index.html

Hope it would be useful.

Regarding merging swagger files - I do not know about tools for merging multiple swagger files into one. Maybe stackoveflow would be better place to ask this question.

Closing this issue

Many Thanks .
Your link was very useful. Just one more question, is there any way to show the multiple APIs links in first panel (left most) instead of showing it in top panel.

Thanks in advance.

@prverma3 so far there are no such option. It may be added as part of https://github.com/Rebilly/ReDoc/issues/181 feature request but I don't have timeline for this so foar

@RomanGotsiy - I need the capability discussed on this thread but the sample referenced in this discussion in no more active. Could someone share an example of multiple api's?

Hello. The link shared above regarding how to use multiple swagger files with redoc is no longer working. Could you please share a working link? I would like to know how to use multiple swagger files also

For everyone who use docker: I have written a Docker Image for that problem. Based on react: https://hub.docker.com/r/volbrene/redoc

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skllcrn picture skllcrn  路  3Comments

bmarwell picture bmarwell  路  3Comments

shreyas-agnihotri picture shreyas-agnihotri  路  3Comments

RomanHotsiy picture RomanHotsiy  路  3Comments

RamakrishnaChilaka picture RamakrishnaChilaka  路  3Comments