Skip to content

context.report(): add new property for external documentation #1052

Open
@jeremyfiel

Description

Is your feature request related to a problem? Please describe.
As an API governance architect, we have a number of design decisions enforced with Redocly rules. While we try to make the rules self-documenting, there are definitely some instances which require a deeper context on the decision.

Describe the solution you'd like
I would like a property to include an external link to documentation supporting the design decision of a particular rule so a user of the linter can find reference material for the rule.

{
    "message": <string>,
    "location": Location{},
    "suggest": <string>[],
    "from": Location{},
    "reference": <string><uri-reference>
}

Describe alternatives you've considered
I'm currently trying out \n\t formatting in the message body but I would like something more formal.

report({
      message: `this is a message with a reference to external docs\n\treference: https://www.redocly.com`
      })
  1:1  warning  custom-id/some-rule  this is a message with a reference to external docs
        reference: https://www.redocly.com

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions