Just as a FYI for others who might be trying to do the same thing, after following this link I was able to get exactly what I wanted done. https://azimi.me/2015/07/16/split-swagger-into-smaller-files.html
Skip to the end where it has a link to the Github to run a CLI command to merge all the files into a single yaml On Tuesday, May 22, 2018 at 11:22:41 PM UTC+10, Timothy Lavelle wrote: > > Hi, > > I'm working on designing quite a few APIs and my current Swagger file in > the online editor is quite large. I'd like to bring it all to my local dev > environment and structure my $ref into logical folder structures for the > components I share globally and across different paths. I use MS Code as my > editor and am wondering if I can design locally and compile the final yaml > file for viewing in my local SwaggerUI editor. > > Example of my local folder structure: > [root] > - [components] > -- [requestBodies] > --- myFile1.yaml > --- myFile2.yaml > -- [responses] > --- 200.yaml > --- 400.yaml > --- 500.yaml > -- [schemas] > --- [content] > ---- contentItem.yaml > --- [cta] > ---- ctaItem.yaml > --- [media] > ---- mediaItem.yaml > --- [shared] > ---- animationAttr.yaml > -- meta_data.yaml > -- [securitySchemas] > --- auth.yaml > - [models] > -- apiServers.yaml > -- contact.yaml > - index.yaml > > > The above is a sample of what my folder structure looks like and the > index.yaml file is the main file I want to compile everything into and the > file I want the SwaggerUI editor to import so I can see the live > documentation. > > Has anyone else done anything similar and if so, what tools did you use to > get this all working? > > Thanks! > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
