Comments (5)
This is a missing feature rather than a bug, it's the same problem as #230 vacuum needs more intelligence to detect this.
In regard to the update for #230 this is high on the list of fixes I want to make in the next round of updates, that should be coming along soon, I am working on some other tooling at the moment.
from vacuum.
Please try v0.1.0
and let me know how you get on.
from vacuum.
Hi @daveshanley thanks for quick fix
Now, I get a circular-references
error after using 0.1.0
version. Please see the example:
Command: vacuum report v1/routes.yaml -p v1
v1/routes.yaml
components:
schema:
testSchema:
type: object
metadata:
$ref: >-
../base-yaml#/components/schemas/metadata
base.yaml
components:
schema:
metadata:
type: object
properties:
data1:
type: string
description: data 1
data2:
type: string
description: data 2
The error that I get:
{
"message": "cannot resolve reference `../base.yaml#/components/schemas/metadata`, it's missing: $components.schemas['metadata'] [...:..]",
"range": {
...
},
"path": "$components.schemas['metadata']",
"ruleId": "circular-references",
"ruleSeverity": "error"
}
Could you please tell me if there is any problem on my side or if it is a bug in this version? Thanks
from vacuum.
Hi @sezgigumus
What you're now seeing is improved detection for missing references or un-resolved references. This is supposed to happen, before these bad refs were not being reported.
However what is wrong here, is that the rule is marked as 'circular-references' it should not be lumped into that category. I will fix that to be something appropriate, however the error is accurate.
To use local / remote or relative references, use the -p
/ --base
flag to set a base directory or URL for vacuum to use to look up the references.
https://quobix.com/vacuum/commands/lint/
Thanks
from vacuum.
I cleaned up the rule for reporting circular references and resolving issues in v0.1.1
from vacuum.
Related Issues (20)
- Vacuum bundle to ingest all files in a directory
- Vacuum to warn of duplicate paths HOT 1
- Vacuum bundle output format
- Vscode plugin not starting on windows, had to add to path variable. HOT 4
- Valid spec is mentionned as invalid HOT 4
- Invalid Error when parsing a schema with a field type string + format HOT 2
- Support overriding `description` of `$ref` as part of OpenAPI 3.1 HOT 1
- Vacuum failing for component names that contain special characters HOT 4
- Panic when I use an external reference as a request body. HOT 4
- Data race in rule_applicator.go HOT 4
- Issues resolving OpenAPI references HOT 12
- schema function behavior inconsistent with equivalent spectral rule
- MINGW64_NT-10.0-22631 os type is not supported HOT 1
- Vacuum misses path parameter on validation HOT 1
- Vacuum not validating nullable fields in schemas correctly HOT 2
- Enumeration function segfaults with more than 2 entities in list
- Escaping `*` in pattern is flagged as invalid `ECMA-262` regex HOT 1
- Nil pointer dereference issue on OWASP JWT rule
- parameter missing description false positive HOT 4
- media type missing example - possible false positive HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vacuum.