@quobix/vacuum 0.32.0 → 0.33.1
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 +72 -8
- 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.
|
|
@@ -269,6 +287,27 @@ vs individually.
|
|
|
269
287
|
|
|
270
288
|
### [Quick Start Guide 🚀](https://quobix.com/vacuum/start)
|
|
271
289
|
|
|
290
|
+
### Bundle AsyncAPI 3
|
|
291
|
+
|
|
292
|
+
`vacuum bundle` detects AsyncAPI 3 documents and supports inline and composed output:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
vacuum bundle events.asyncapi.yaml bundled.yaml
|
|
296
|
+
vacuum bundle events.asyncapi.yaml bundled.json --composed --delimiter __
|
|
297
|
+
cat events.asyncapi.yaml | vacuum bundle --stdin --stdout --base ./specs --format json
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
External objects are inlined by default. Shared schemas are emitted once, with
|
|
301
|
+
local references for later uses. Composed mode stores external objects in AsyncAPI
|
|
302
|
+
component sections. Both modes preserve the local references required by
|
|
303
|
+
operations, messages, channels, and servers. Input-file references resolve from
|
|
304
|
+
the input directory unless `--base` is supplied. Use `--remote=false` to disable
|
|
305
|
+
remote loading; `--ext-refs` opts into resolving references inside extensions.
|
|
306
|
+
Unresolved or ambiguous references return an error without writing an incomplete
|
|
307
|
+
bundle. Schema resource IDs are resolved before relocation. Non-JSON schema
|
|
308
|
+
content is preserved; language-specific imports and dynamic JSON Schema references
|
|
309
|
+
are not bundled.
|
|
310
|
+
|
|
272
311
|
See all the documentation at https://quobix.com/vacuum
|
|
273
312
|
|
|
274
313
|
- [Installing vacuum](https://quobix.com/vacuum/installing/)
|
|
@@ -286,7 +325,7 @@ See all the documentation at https://quobix.com/vacuum
|
|
|
286
325
|
- [docs](https://quobix.com/vacuum/commands/docs/)
|
|
287
326
|
- [dashboard](https://quobix.com/vacuum/commands/dashboard/)
|
|
288
327
|
- [html-report](https://quobix.com/vacuum/commands/html-report/)
|
|
289
|
-
- [bundle](https://quobix.com/vacuum/commands/bundle/)
|
|
328
|
+
- [bundle](https://quobix.com/vacuum/commands/bundle/) - OpenAPI and AsyncAPI 3, with inline and composed output.
|
|
290
329
|
- [spectral-report](https://quobix.com/vacuum/commands/spectral-report/)
|
|
291
330
|
- [language-server](https://quobix.com/vacuum/commands/language-server/)
|
|
292
331
|
- [upgrade](https://quobix.com/vacuum/commands/upgrade/)
|
|
@@ -523,6 +562,30 @@ if you're interested in seeing how things are progressing, it's available.
|
|
|
523
562
|
```
|
|
524
563
|
|
|
525
564
|
---
|
|
565
|
+
## OWASP hard mode
|
|
566
|
+
|
|
567
|
+
Run `vacuum lint --hard-mode api.yaml` to enable all built-in OpenAPI rules,
|
|
568
|
+
including the OWASP rules. Hard mode checks:
|
|
569
|
+
|
|
570
|
+
- OAuth [password](https://quobix.com/vacuum/rules/owasp/owasp-oauth-no-password/)
|
|
571
|
+
and [implicit](https://quobix.com/vacuum/rules/owasp/owasp-oauth-no-implicit/) flows.
|
|
572
|
+
- [Authentication endpoint URLs](https://quobix.com/vacuum/rules/owasp/owasp-auth-urls-https/)
|
|
573
|
+
and server URLs for HTTPS, including overrides and server variables.
|
|
574
|
+
- Request objects for unrestricted fields and maps for property-count limits.
|
|
575
|
+
- Write operations for authenticated security requirements, without anonymous alternatives.
|
|
576
|
+
- Declared JWTs for an RFC8725 reference in their description, as a warning.
|
|
577
|
+
|
|
578
|
+
**Changes for existing users:** strict write security now reports an **error**,
|
|
579
|
+
previously informational. A requirement such as `security: [{auth: []}, {}]` can
|
|
580
|
+
now fail a build. Also, `x-lint-ignore` applies to the entire subtree beneath its
|
|
581
|
+
location for every ruleset, rather than only the node and its immediate children.
|
|
582
|
+
|
|
583
|
+
See the [OWASP guide](https://quobix.com/vacuum/rulesets/owasp/) for rule details
|
|
584
|
+
and severity overrides, and [ignoring violations](https://quobix.com/vacuum/ignoring/)
|
|
585
|
+
for scoped exceptions.
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
526
589
|
## Spectral migration
|
|
527
590
|
|
|
528
591
|
vacuum loads YAML and JSON rulesets. Resolve each relative `extends` path from the
|
|
@@ -540,9 +603,10 @@ Use `[vacuum:owasp, all]` for vacuum's built-in OWASP checks instead of importin
|
|
|
540
603
|
rule names and behavior; they do not execute the Spectral package. JavaScript
|
|
541
604
|
ruleset modules (`.js`, `.mjs`, `.cjs`) are not supported.
|
|
542
605
|
|
|
543
|
-
Arazzo
|
|
544
|
-
|
|
545
|
-
Arazzo
|
|
606
|
+
Arazzo 1.0 and 1.1 workflows use `vacuum lint workflows.yaml` and the normal
|
|
607
|
+
report commands. `spectral:arazzo` selects Vacuum's native recommended rules.
|
|
608
|
+
See [Arazzo linting](ARAZZO.md) for source lookup, rule IDs, incomplete checks
|
|
609
|
+
and migration differences.
|
|
546
610
|
|
|
547
611
|
`--functions` takes a directory containing custom function files:
|
|
548
612
|
|