Skip to content

Support JSON-schema assertion in configurable rules #1886

Open
@RomanHotsiy

Description

Is your feature request related to a problem? Please describe.

Some people maintain JSON schemas to validate some parts of OpenAPI. We don't have a way to use them.

Describe the solution you'd like

I would like to add support for json schema assertion for our configurable rules. It may look like this:

rule/info-metadata-check:
  subject:
    type: Info
    property: x-metadata
  message: Metadata should match the schema.
  assertions:
    json-schema:
      $ref: ./metadata-schema.json

Describe alternatives you've considered

Right now it is possible to achieve using custom assertions/rules via plugin: https://redocly.com/docs/cli/rules/configurable-rules#custom-function-example

Additional context

Reported in Write the Docs slack: https://writethedocs.slack.com/archives/C4EPE8332/p1738793608940479

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