@quobix/vacuum 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,13 @@ Alternatively, you can pull it from
|
|
|
56
56
|
[Github packages](https://github.com/daveshanley/vacuum/pkgs/container/vacuum).
|
|
57
57
|
To do that, replace `dshanley/vacuum` with `ghcr.io/daveshanley/vacuum` in the above commands.
|
|
58
58
|
|
|
59
|
+
## Run with Go
|
|
60
|
+
|
|
61
|
+
If you have go >= 1.16 installed, you can use `go run` to build and run it:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
go run github.com/daveshanley/vacuum@latest lint <your-openapi-spec.yaml>
|
|
65
|
+
```
|
|
59
66
|
|
|
60
67
|
---
|
|
61
68
|
|
|
@@ -92,7 +99,21 @@ come say hi!
|
|
|
92
99
|
|
|
93
100
|
## Documentation
|
|
94
101
|
|
|
95
|
-
|
|
102
|
+
|
|
103
|
+
🔥 **New in** `v0.11+` 🔥 : **Ignore Linting Errors/Violations**.
|
|
104
|
+
|
|
105
|
+
v0.11 introduces the ability to ignore specific linting errors. This is useful for when you want to implement new
|
|
106
|
+
rules to existing production APIs. In some cases, correcting the lint errors would result in a breaking change.
|
|
107
|
+
|
|
108
|
+
Having a way to ignore these errors allows you to implement the new rules for new APIs while maintaining
|
|
109
|
+
backwards compatibility for existing ones.
|
|
110
|
+
|
|
111
|
+
[Learn more about ignoring violations](https://quobix.com/vacuum/ignoring/)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
`v0.10+` : **Quality release**.
|
|
96
117
|
|
|
97
118
|
v0.10 is a quality release, with a number of fixes and improvements to rule schemas, function names and more.
|
|
98
119
|
vacuum now powers [The OpenAPI doctor](https://pb33f.io/doctor/). To enable correct ruleset management and automation
|
|
@@ -358,6 +379,35 @@ recognizes a compressed report file and will deal with it automatically when rea
|
|
|
358
379
|
|
|
359
380
|
> When using compression, the file name will be `vacuum-report-MM-DD-YY-HH_MM_SS.json.gz`. vacuum uses gzip internally.
|
|
360
381
|
|
|
382
|
+
## Ignoring specific linting errors
|
|
383
|
+
|
|
384
|
+
You can ignore specific linting errors by providing an `--ignore-file` argument to the `lint` and `report` commands.
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
./vacuum lint --ignore-file <path-to-ignore-file.yaml> -d <your-openapi-spec.yaml>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
./vacuum report --ignore-file <path-to-ignore-file.yaml> -c <your-openapi-spec.yaml> <report-prefix>
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
The ignore-file should point to a .yaml file that contains a list of errors to be ignored by vacuum. The structure of the
|
|
395
|
+
yaml file is as follows:
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
<rule-id-1>:
|
|
399
|
+
- <json_path_to_error_or_warning_1>
|
|
400
|
+
- <json_path_to_error_or_warning_2>
|
|
401
|
+
<rule-id-2>:
|
|
402
|
+
- <json_path_to_error_or_warning_1>
|
|
403
|
+
- <json_path_to_error_or_warning_2>
|
|
404
|
+
...
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Ignoring errors is useful for when you want to implement new rules to existing production APIs. In some cases,
|
|
408
|
+
correcting the lint errors would result in a breaking change. Having a way to ignore these errors allows you to implement
|
|
409
|
+
the new rules for new APIs while maintaining backwards compatibility for existing ones.
|
|
410
|
+
|
|
361
411
|
---
|
|
362
412
|
|
|
363
413
|
## Try out the dashboard
|