-
-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Hi there,
I have a directory structured as follows:
openapi/
├─ api-suite/
│ ├─ components/
│ │ ├─ parameters/
│ │ │ ├─ example_param.yaml
│ ├─ paths/
│ │ ├─ hello_world.yaml
│ ├─ openapi.yaml
My API is quite large, so I utilize the $ref syntax quite heavily, especially when referring to files in other directories. For example, within hello_world.yaml, under parameters, I have an entry for - $ref: ../components/parameters/example_param.yaml.
However, I observe the following behavior when I run the following commands:
~/openapi/api-suite
> vacuum dashboard openapi.yaml
...yields:
ERROR unable to open the rolodex file, check specification references and base path
└ file: ../components/parameters/example_param.yaml
└ error: open /Users/m/openapi/components/parameters/example_param.yaml
ERROR unable to locate reference anywhere in the rolodex reference: ../components/parameters/example_param.yaml
If I try running vacuum at the parent directory level (~/openapi) with the following command, api-suite is also not being utilized.
~/openapi
> vacuum dashboard api-suite/openapi.yaml --base="api-suite"
...yields the same error:
ERROR unable to open the rolodex file, check specification references and base path
└ file: ../components/parameters/example_param.yaml
└ error: open /Users/m/openapi/components/parameters/example_param.yaml
ERROR unable to locate reference anywhere in the rolodex reference: ../components/parameters/example_param.yaml
It appears like one of two things is happening:
- For some reason, naming my directory
api-suiteis causing issues and not being respected. - Since I use
../, it is being applied in the PWD (i.e. at~/openapi/partner-apior~/openapi), instead of at the level of the directory where the file exists.
Thank you for taking a look!
More importantly, thanks for making an awesome open-source project! I'm looking forward to seeing what issues it uncovers on my OpenAPI spec 😄