Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.6.0 Adds support for distributed rulesets. #395

Merged
merged 11 commits into from
Dec 13, 2023
Merged

v0.6.0 Adds support for distributed rulesets. #395

merged 11 commits into from
Dec 13, 2023

Conversation

daveshanley
Copy link
Owner

@daveshanley daveshanley commented Dec 12, 2023

Add support for extending external rulesets, a feature requested by #254

Now rulesets can be extended easily using local files or remote files. vacuum also supports this feature recursively, which means entire chains of extension rulesets can be created.

The following syntax is now valid

extends:
  - 'spectral:oas'
  - ./rules/stringTypeConstraints.yaml
  - ../things/integerAndNumberTypeConstraints.yml
  - http://somedomain-out-there.com/path/to/rules.yaml
  - http://somwhere-else-out-there.com/more/rules.json

Adds support for feature #278

Added new -m and -b banner flags for lint command

The banner can now be disabled using the -b or —no-banner flag, as well as the message output (when using -d) can be disabled with the -m or the —no-message flags.

Adds support for #284

The rule has been downgraded to a warning from an error.

Adds support for #293

New -a / —all-results flag enables all result output #293

Want to see everything when using -d, well now you can.

Adds support for #318

message now overrides all core function messages #318

By adding a ‘message` property to a rule that uses a core function, any violations for that rule, will use the supplied message completely, vs the default output built into vacuum for that core function. This gives complete control over the message presented to users who violate the rule.

For example:

extends: [[spectral:oas, off]]
documentationUrl: https://quobix.com/vacuum/rulesets/custom-rulesets
rules:
  check-title-is-exactly-this:
    description: Check the title of the spec is exactly, 'this specific thing'
    severity: error
    message: you have to make the title 'this specific thing'
    recommended: true
    formats: [oas2, oas3]
    given: $.info
    then:
      field: title
      function: pattern
      functionOptions:
        match: 'this specific thing'
    howToFix: Make sure the title matches 'this specific thing'

Results in this:
Screenshot 2023-12-13 at 11 01 40 AM

New version command

Will print out the current version vacuum version

Signed-off-by: quobix <dave@quobix.com>
Signed-off-by: quobix <dave@quobix.com>
Signed-off-by: quobix <dave@quobix.com>
Signed-off-by: quobix <dave@quobix.com>
Signed-off-by: quobix <dave@quobix.com>
The banner can now be disabled using the `-b`  or `—no-banner` flag, as well as the message output (when using `-d`) can be disabled with the `-m` or the `—no-message` flags.

Signed-off-by: quobix <dave@quobix.com>
moved down to a warning.

Signed-off-by: quobix <dave@quobix.com>
Want to see everything when using `-d`, well now you can.

Signed-off-by: quobix <dave@quobix.com>
By adding a ‘message` property to a rule that uses a core function, any violations for that rule, will use the supplied message completely, vs the default output built into vacuum for that core function. This gives complete control over the message presented to users who violate the rule.

Signed-off-by: quobix <dave@quobix.com>
Signed-off-by: quobix <dave@quobix.com>
As I was cleaning up the docs, I noticed that a `version` command would go down well.

Signed-off-by: quobix <dave@quobix.com>
@daveshanley daveshanley merged commit af6b2c1 into main Dec 13, 2023
6 checks passed
@daveshanley daveshanley deleted the v0.6.0 branch December 13, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant