vacuum
vacuum copied to clipboard
Issues resolving OpenAPI references
Here is the error in VSCode
:
Here is the path in the file referenced:
Additionally the web docs path for the vacuum linting error sends me here: https://quobix.com/vacuum/rules/schemas/resolving-references/
But this link goes right to a 404
This failure is happening because of the x-
prefix, it looks like an extension, so it's not indexed, which means it cannot be looked up.
And the 404, yeah I know about that one - thanks for the nudge. I will address it.
If you look here: https://spec.openapis.org/oas/v3.1.0#header-object
You can see that Header
objects can be extended with extensions, which means anything with x-
as a prefix is considered an extension and is excluded .
Should that still be parsed that way when its at the name level of the object and not a property?
Also if its exclusively the x-
that is the problem, how about these references?
Have you configured vacuum when using the VSCode plugin? And set a base path?
Wouldn’t the base path be the pwd of the current document?
On Fri, Apr 19, 2024 at 5:33 PM quobix @.***> wrote:
Have you configured vacuum when using the VSCode plugin? And set a base path?
— Reply to this email directly, view it on GitHub https://github.com/daveshanley/vacuum/issues/488#issuecomment-2067357687, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLQECS2R34G3F7BZD3ZBDTY6GLSBAVCNFSM6AAAAABGPSL6JCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGM2TONRYG4 . You are receiving this because you authored the thread.Message ID: @.***>
Well, not out of the gate, it's why there is a --base
/ -p
flag to tell vacuum where to look as people tend to scatter things all over the place.
Check out the configuration options and set a base path. Let me know how that works, and then perhaps we can look at tuning the VScode plugin to try and set it automatically.
Just a note that adding a vacuum.conf.yaml
with a base of "."
does not resolve this issue.
does it work when you use vaccum
outside of VSCode just as a CLI tool?
It seems to be, or at least its not providing the same errors.
It's now saying the below for most of these $ref
s
a `$ref` cannot be placed next to any other properties
But this seems to go against the documentation for $ref
s being able to include a description.
https://www.speakeasyapi.dev/openapi/references
I recognize these latest errors are also mentioned here: #484