Forum Discussion

Stoplight's avatar
Stoplight
Community Manager
2 months ago
Solved

Support for an OpenAPI spec that is split among multiple files (using $ref)

Originally posted by user x0nifo to the Stoplight Community on 11/10/2022 at 06:44 ET.

I'm in the process of evaluating Stoplight as a potential solution for rendering our docs, powered by OpenAPI. Right now, in our repository we have a main openapi.yaml file that however references (via $ref) files that are in different paths inside the same repo. For example, it might do things like $ref: "../../Foo.yml#/components/responses/Bar". We never commit the combined file to the repository. Is that something that the GitHub Stoplight integration supports out of the box? In other words, will we be able to keep using our current structure (i.e. split files) and have Stoplight automatically generate and validate the spec, transparently?