stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI (v3.1, v3.0, and v2.0), Arazzo v1.0, as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.46k stars 234 forks source link

make documentationUrl available as part of Javascript API linting result #1488

Open apiglue opened 3 years ago

apiglue commented 3 years ago

Chore summary When using a custom ruleset which utilizes a different documentUrl per rule, the Javascript API and the CLI linting results should include the respective rule documentUrl.

Tasks

.i.e for Javascript API:

        {
            "code": "operation-description",
            "message": "Operation `description` must be present and non-empty string.",
            **"documentUrl": "https://mydomain.io/operation-description.html",**
            "path": [
                "paths",
                "/contacts/",
                "post"
            ],
            "severity": 1,
            "range": {
                "start": {
                    "line": 122,
                    "character": 13
                },
                "end": {
                    "line": 127,
                    "character": 25
                }
            }
        },

Additional context Add any other context about the chore here.

github-actions[bot] commented 4 months ago

This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (STOP-549) has been created.