on-internet
← Community

How to merge multiple OpenAPI specifications?

Stack Overflow ·

I'm digging here around trying to find a solution, how to merge several OpenApi v3 component definitions in one file. Let's imagine a situation: You decided to split your OpenApi into multiple files in different folders. (see image below) Now you need to combine all your components.v1.yaml into a single schema (i named it blueprint.v1.yaml). Usually, I use swagger-cli to merge all $ref dependencies, but now it's not a case, because I can not refer to the whole components/schemas object list And use it to build a single OpenApi file with all fields filled: info, components, paths and so on with

Comments

Sign in or sign up to comment and upvote.

No comments yet.