daveshanley / vacuum

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.
https://quobix.com/vacuum
MIT License
560 stars 44 forks source link

Creating html-report from Vacuum report does not support custom rules #528

Open LittleGreenYoda42 opened 1 month ago

LittleGreenYoda42 commented 1 month ago

When creating an html-report from a vacuum report, the html page only contains results for the default rules.

This is because when re-creating the nodes from the report data, the rule data is taken from the OpenAPIDefaultRuleSet and retrieved via the rule-id..

As custom rules are not contained in the default ruleset, the rule definition is nil. This has the effect that the function for getting rules by category will exclude the results for custom rules by checking that the rule must not be nil.

I guess one option could be to put the ruleset used for creating the report into the report as well. Another one to let the user hand in the same ruleset again when creating the html-report and reading from the vacuum report file. (although that feels strange)

daveshanley commented 1 month ago

This is a bug.