Skip to content

v0.11.0

Compare
Choose a tag to compare
@daveshanley daveshanley released this 09 Jul 16:11
· 27 commits to main since this release

Re-builds some of the rules to use the doctor instead of core functions. Adds some nil checks for issues reported.

Adresses:

Ignoring specific linting errors

You can ignore specific linting errors by providing an --ignore-file argument to the lint and report commands.

./vacuum lint --ignore-file <path-to-ignore-file.yaml> -d <your-openapi-spec.yaml>
./vacuum report --ignore-file <path-to-ignore-file.yaml> -c <your-openapi-spec.yaml> <report-prefix>

The ignore-file should point to a .yaml file that contains a list of errors to be ignored by vacuum. The structure of the
yaml file is as follows:

<rule-id-1>:
  - <json_path_to_error_or_warning_1>
  - <json_path_to_error_or_warning_2>
<rule-id-2>:
  - <json_path_to_error_or_warning_1>
  - <json_path_to_error_or_warning_2>
  ...

Ignoring errors is useful for when you want to implement new rules to existing production APIs. In some cases,
correcting the lint errors would result in a breaking change. Having a way to ignore these errors allows you to implement
the new rules for new APIs while maintaining backwards compatibility for existing ones.

Feature contributed by @lobocv

Read the docs

Changelog

  • a24db7e Add go run method to README
  • 6041a74 Added README for ignore-file
  • be14e9f Added Execution to VacuumReport
  • c0384f4 Added a nil check
  • 4708439 Addressed issue #510
  • 7fd882f Fixed example check logic
  • 890f507 Fixed some glitches with examples missing
  • 002d40c Implemented an ignore-file (-i) option to the lint command which takes a YAML file that lists the paths for each rule for which to ignore errors for.
  • b60dcfd Improved tests to check for success in stdout
  • f8f513b Updated deps, updated readme.
  • 355c8ec added build graph option to vacuum execution.
  • f5bc15f added more nill checks for polymorphic type checks
  • b8f03ce added new functions to replace old core based ones
  • f38b6a7 added nil check
  • 7b4c1fe added nill check
  • 1b25c33 added nill check to operation_id
  • e67926d added schema check to media type
  • 3b076bf addressed #501
  • efc73a7 addressed issue #507
  • fe36303 bump deps
  • 4bb27fb bumped deps
  • 78040c1 clean up rule keynode
  • 47ce52e cleaned go.mod
  • 412e0ff cleaned up operation_parameters
  • 1b4acdb cleaned up operation_tags functions
  • 6e66fdc cleaned up test
  • 31fe9bc fixed / updated operation_id function tests
  • f574d29 fixed location for owasp check error response function
  • 3bdcb18 fixed owasp header_definition function
  • c393ef3 fixed rule schema name
  • cb42322 fixed ruleset functions for rebuilt functions
  • f9762fa fixed tests for new openapi functions
  • f29019f fixing owasp header definition schema and function
  • d20d96e made sure doctor is added in correctly, avoids another node lookup on ruleset functions.
  • 8237d7f rebuilt operation 4x response function.
  • 34b0a75 rebuilt operation tags functions
  • 1510d45 rebuilt operation_descriptions.go
  • 30d8edf rebuilt operation_id openapi function
  • 459465a rebuilt operation_tags function
  • 5fb4b6a rewrote functions that use truthy, to use the doctor.
  • ac1e9af updated function test count
  • ac87130 updated no_ambiguious_paths to have correct node location.