microcks / microcks-spectral-ruleset

A set of rules for Spectral that allows linting OpenAPI and AsyncAPI spec for Microcks conventions

Home Page:https://microcks.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

console.warn() pollutes JSON report output

lbroudoux opened this issue · comments

Reason/Context

When using the -f json of Spectral, the console.warn() messages are polluting the ouytput and make it a non valid JSON document.

Description

Those console.warn() directives must be omit from output in non-console output mode. Ideally the details (hints on impacts) should be included in full message used in report.

Implementation ideas

We could make this output conditional if a variable environment like MICROCKS_HINTS is provided and set to true