Ahh, the traditional generated HTML report. Quite often, they are a real let-down.
I wanted to do something not awful when it comes to the HTML report. vacuum can generate a self-contained interactive UI experience for exploring linting results from an OpenAPI specification, or a vacuum report.
The report has no dependencies, and it makes no network calls. The HTML file that is generated, is fully self-contained, it can be used without an internet connection.
The report is generated in milliseconds and loads just as fast, even for enormous specifications!
The report uses WebComponents via Lit, which means it renders really, really fast.
Build a report from an OpenAPI Spec
html-report command followed by a path to your OpenAPI Spec. There is a second optional argument
that allows the naming of the report file, otherwise it defaults to report.html.
There should be a file named report.html in the current working direction. Open it up in your favorite browser.s
Change the report output file
Load a vacuum report
Load a vacuum report and render the results as they were recorded, without re-running any linting rules or indexing.
lint supports the following flags
||Disable the timestamp from being generated on the report.|
||Disable color and style console output (useful for CI/CD)|
html-report supports the following global flags
||Use an existing ruleset file for linting|
||Base URL or Base working directory to use for relative references|
Want to see an example report? Don’t have an OpenAPI spec?
Make sure you have checked out the source, and you’re in the vacuum directory, then you can use example specs: