arjun-g / vs-swagger-viewer

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.
MIT License
170 stars 47 forks source link

Does not allow for multiple abstracted YAML files #12

Open calabresechris opened 7 years ago

calabresechris commented 7 years ago

No matter what I try, I can't add a reference to another yaml file, even if it is in the same directory as the main yaml. I'm not sure if this is intended or not, but I'm sure I'm not the only person who is trying to work on large-scale yamls that are being spread out over multiple files.

Thanks!

siarhei-klimuts commented 6 years ago

If I use following file structure: project/

so path to openapi.yaml is project/openapi/openapi.yaml and path to group.yaml is project/openapi/schemas/group.yaml

When I try to reference group.yaml from openapi.yaml I see the following error message: Error opening file "/home/user/project/schemas/group.yaml" ENOENT: no such file or directory, open '/home/user/project/schemas/group.yaml'

Pay attention to path project/schemas, there should be project/openapi/schemas Looks like extension uses project folder as root, not openapi where is openapi.yaml located