vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. Built in go, it tears through API specs faster than you can think. vacuum is compatible with Spectral rulesets and generates compatible reports.
The first example is failing because ensureAllExpectedParamsInPathAreDefined is skipping over top. The second example fails because ensureAllExpectedParamsInPathAreDefined doesn't take verb into account when checking for parameters.
This PR makes sure ensureAllExpectedParamsInPathAreDefined goes over all the expected path parameters and checks both the top-level and the verb-level parameters. I've also added test cases for these scenarios.
This PR should solve Issue #435. Currently, vacuum does not find pick up errors with the two following examples.
Example 1
Example 2
The first example is failing because
ensureAllExpectedParamsInPathAreDefined
is skipping overtop
. The second example fails becauseensureAllExpectedParamsInPathAreDefined
doesn't takeverb
into account when checking for parameters.This PR makes sure
ensureAllExpectedParamsInPathAreDefined
goes over all the expected path parameters and checks both the top-level and the verb-level parameters. I've also added test cases for these scenarios.