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?
Richard Rance [11/10/2022 - 10:10 ET]
They allow some components to be referenced from other files https://meta.stoplight.io/docs/platform/6b4a955df53df-shared-components
I'd love it if they added support to putting each path's definition into a different file.