Unable to parse results to html report.
Steps I have followed
Configure and Run const results = await spectral.run(myDocument);
Pass results in formatOutput() const htmlResults = formatOutput(results, "html", spectral.ruleset)
This is the package i'm using
import outputFormatter from '@stoplight/spectral-cli/dist/services/output.js'
const { formatOutput, writeOutput } = outputFormatter
Const results Output: [ { "code": "operation-tags", "message": "Operation must have non-empty \"tags\" array.", "path": [ "paths", "/health", "get", "tags" ], "severity": "warn", "range": { "start": { "line": 15, "character": 11 }, "end": { "line": 15, "character": 14 } } }, { "code": "operation-tags", "message": "Operation must have non-empty \"tags\" array.", "path": [ "paths", "/policies", "post" ], "severity": "warn", "range": { "start": { "line": 43, "character": 9 }, "end": { "line": 72, "character": 55 } } }, { "code": "operation-tags", "message": "Operation must have non-empty \"tags\" array.", "path": [ "paths", "/policies", "get" ], "severity": "warn", "range": { "start": { "line": 73, "character": 8 }, "end": { "line": 102, "character": 58 } } } ] Const htmlResults Output : <!DOCTYPE html>
Spectral Report