@quobix/vacuum 0.31.0 → 0.33.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 +79 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</picture>
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
# The world's fastest OpenAPI, AsyncAPI and JSON Schema linter.
|
|
7
|
+
# The world's fastest OpenAPI, AsyncAPI, Arazzo and JSON Schema linter.
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
[](https://discord.gg/UAcUF78MQN)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[](https://hub.docker.com/r/dshanley/vacuum)
|
|
14
14
|
[](https://github.com/avelino/awesome-go)
|
|
15
15
|
|
|
16
|
-
An **ultra-super-fast**, lightweight OpenAPI, AsyncAPI and JSON Schema linter and quality checking tool inspired by [Spectral](https://github.com/stoplightio/spectral).
|
|
16
|
+
An **ultra-super-fast**, lightweight OpenAPI, AsyncAPI, Arazzo and JSON Schema linter and quality checking tool inspired by [Spectral](https://github.com/stoplightio/spectral).
|
|
17
17
|
|
|
18
18
|
It supports Spectral-style YAML and JSON rulesets. See [Spectral migration](#spectral-migration) for compatibility limits and built-in alternatives.
|
|
19
19
|
|
|
@@ -139,7 +139,25 @@ come say hi!
|
|
|
139
139
|
|
|
140
140
|
## Documentation
|
|
141
141
|
|
|
142
|
-
🔥 **New in** `v0.
|
|
142
|
+
🔥 **New in** `v0.33` 🔥: **Arazzo workflow linting and a new `or` function**
|
|
143
|
+
|
|
144
|
+
Arazzo 1.0 and 1.1 workflows are now a first-class document type in vacuum, alongside OpenAPI, AsyncAPI and JSON Schema.
|
|
145
|
+
Use `vacuum lint workflows.yaml` and vacuum will detect Arazzo automatically, with recommended rules for workflow structure,
|
|
146
|
+
references, parameters, expressions and linked source documents. Results work in the normal reports, dashboard and editor diagnostics.
|
|
147
|
+
|
|
148
|
+
The new `or` core function checks that **at least one of two or more properties exists**. Use
|
|
149
|
+
`properties: [title, summary, description]` to require one of those fields. A property counts as present even when its
|
|
150
|
+
value is `null`, `false`, `0` or an empty string.
|
|
151
|
+
|
|
152
|
+
This release also fixes AsyncAPI header, server and version checks, and improves result locations for YAML aliases and shared references.
|
|
153
|
+
|
|
154
|
+
- [Read more about Arazzo linting in vacuum](https://quobix.com/vacuum/arazzo/)
|
|
155
|
+
- [See the default Arazzo ruleset](https://quobix.com/vacuum/rulesets/arazzo-recommended/)
|
|
156
|
+
- [Read more about the new `or` function](https://quobix.com/vacuum/functions/core/or/)
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
`v0.29`: **Lint AsyncAPI 3 documents in vacuum**
|
|
143
161
|
|
|
144
162
|
[AsyncAPI](https://www.asyncapi.com) is now a first-class document type in vacuum, alongside OpenAPI and JSON Schema.
|
|
145
163
|
Use the normal `lint` command and vacuum will detect AsyncAPI 3 documents automatically.
|
|
@@ -152,7 +170,7 @@ Use the normal `lint` command and vacuum will detect AsyncAPI 3 documents automa
|
|
|
152
170
|
|
|
153
171
|
---
|
|
154
172
|
|
|
155
|
-
|
|
173
|
+
`v0.28`: **Lint JSON Schema documents in vacuum**
|
|
156
174
|
|
|
157
175
|
A new `schema` command has been added that opens up vacuum to JSON Schema specific linting rules and checks!
|
|
158
176
|
With a whole new set of functions and rules, specifically for JSON Schema documents.
|
|
@@ -226,6 +244,28 @@ target exactly what we want to change. vacuum now supports a new `apply-overlay`
|
|
|
226
244
|
|
|
227
245
|
- [Learn more about the apply-overlay command](https://quobix.com/vacuum/commands/apply-overlay)
|
|
228
246
|
|
|
247
|
+
`apply-overlay` can also build a fail-closed publication document after applying
|
|
248
|
+
the standard Overlay actions:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
vacuum apply-overlay internal.yaml public.overlay.yaml public.yaml \
|
|
252
|
+
--include-tag public \
|
|
253
|
+
--tag-match any \
|
|
254
|
+
--prune-unused
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Inclusive tags are exact and case-sensitive; `any` keeps operations with at
|
|
258
|
+
least one included tag and `all` requires every included tag. Untagged
|
|
259
|
+
operations are removed. Filtering runs after Overlay actions and before
|
|
260
|
+
reachability-based component pruning. These opt-in transforms require a
|
|
261
|
+
bundled, self-contained OpenAPI document. Top-level Tag Objects are retained.
|
|
262
|
+
YAML aliases and merge keys are expanded when filtering. Retained mapping
|
|
263
|
+
order, comments, and scalar styles are preserved. Pruning rejects schema
|
|
264
|
+
`$id` scopes that cannot be resolved safely. Link Objects targeting filtered
|
|
265
|
+
operations are retained and reported as warnings. Document output remains
|
|
266
|
+
pure on stdout; warnings are written to stderr. The warning summary uses the `apply-overlay produced` prefix to
|
|
267
|
+
cover both Overlay actions and publication transforms.
|
|
268
|
+
|
|
229
269
|
---
|
|
230
270
|
|
|
231
271
|
|
|
@@ -501,6 +541,30 @@ if you're interested in seeing how things are progressing, it's available.
|
|
|
501
541
|
```
|
|
502
542
|
|
|
503
543
|
---
|
|
544
|
+
## OWASP hard mode
|
|
545
|
+
|
|
546
|
+
Run `vacuum lint --hard-mode api.yaml` to enable all built-in OpenAPI rules,
|
|
547
|
+
including the OWASP rules. Hard mode checks:
|
|
548
|
+
|
|
549
|
+
- OAuth [password](https://quobix.com/vacuum/rules/owasp/owasp-oauth-no-password/)
|
|
550
|
+
and [implicit](https://quobix.com/vacuum/rules/owasp/owasp-oauth-no-implicit/) flows.
|
|
551
|
+
- [Authentication endpoint URLs](https://quobix.com/vacuum/rules/owasp/owasp-auth-urls-https/)
|
|
552
|
+
and server URLs for HTTPS, including overrides and server variables.
|
|
553
|
+
- Request objects for unrestricted fields and maps for property-count limits.
|
|
554
|
+
- Write operations for authenticated security requirements, without anonymous alternatives.
|
|
555
|
+
- Declared JWTs for an RFC8725 reference in their description, as a warning.
|
|
556
|
+
|
|
557
|
+
**Changes for existing users:** strict write security now reports an **error**,
|
|
558
|
+
previously informational. A requirement such as `security: [{auth: []}, {}]` can
|
|
559
|
+
now fail a build. Also, `x-lint-ignore` applies to the entire subtree beneath its
|
|
560
|
+
location for every ruleset, rather than only the node and its immediate children.
|
|
561
|
+
|
|
562
|
+
See the [OWASP guide](https://quobix.com/vacuum/rulesets/owasp/) for rule details
|
|
563
|
+
and severity overrides, and [ignoring violations](https://quobix.com/vacuum/ignoring/)
|
|
564
|
+
for scoped exceptions.
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
504
568
|
## Spectral migration
|
|
505
569
|
|
|
506
570
|
vacuum loads YAML and JSON rulesets. Resolve each relative `extends` path from the
|
|
@@ -518,9 +582,10 @@ Use `[vacuum:owasp, all]` for vacuum's built-in OWASP checks instead of importin
|
|
|
518
582
|
rule names and behavior; they do not execute the Spectral package. JavaScript
|
|
519
583
|
ruleset modules (`.js`, `.mjs`, `.cjs`) are not supported.
|
|
520
584
|
|
|
521
|
-
Arazzo
|
|
522
|
-
|
|
523
|
-
Arazzo
|
|
585
|
+
Arazzo 1.0 and 1.1 workflows use `vacuum lint workflows.yaml` and the normal
|
|
586
|
+
report commands. `spectral:arazzo` selects Vacuum's native recommended rules.
|
|
587
|
+
See [Arazzo linting](ARAZZO.md) for source lookup, rule IDs, incomplete checks
|
|
588
|
+
and migration differences.
|
|
524
589
|
|
|
525
590
|
`--functions` takes a directory containing custom function files:
|
|
526
591
|
|
|
@@ -623,9 +688,14 @@ lint:
|
|
|
623
688
|
|
|
624
689
|
### Environment variables
|
|
625
690
|
|
|
626
|
-
You can configure global
|
|
691
|
+
You can configure global and command-local flags with `VACUUM_<FLAG>`
|
|
692
|
+
environment variables. Use uppercase flag names and replace `-` with `_`.
|
|
693
|
+
Explicit command-line flags take precedence over environment variables;
|
|
694
|
+
environment variables take precedence over configuration files.
|
|
627
695
|
|
|
628
|
-
|
|
696
|
+
Collection flags accept comma-separated values. For example,
|
|
697
|
+
`VACUUM_INCLUDE_TAG='public,partner'` sets the included tags for
|
|
698
|
+
`apply-overlay`.
|
|
629
699
|
|
|
630
700
|
|
|
631
701
|
## Auto-fixing rule violations
|