Created
July 7, 2022 12:18
-
-
Save arno-di-loreto/8f138329933e718421e52b7d7c597cd8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"title": "Ruleset", | |
"description": "A Spectral Ruleset", | |
"type": "object", | |
"properties": { | |
"rules": { | |
"$ref": "#/$defs/Rule" | |
} | |
}, | |
"$defs": { | |
"Rule": { | |
"title": "Rule", | |
"description": "A Spectral Rule", | |
"type": "object", | |
"properties": { | |
"description": { | |
"type": "string" | |
}, | |
"message": { | |
"type": "string" | |
}, | |
"severity": { | |
"description": "The severity of a Spectral Rule", | |
"type": "string", | |
"enum": [ | |
"error", | |
"warn", | |
"info", | |
"hint" | |
], | |
"default": "warn", | |
"$comment": "https://meta.stoplight.io/docs/spectral/e5b9616d6d50c-custom-rulesets#severity" | |
}, | |
"resolved": { | |
"type": "boolean" | |
}, | |
"given": { | |
"$ref": "#/$defs/Given" | |
} | |
} | |
}, | |
"Path": { | |
"title": "Path", | |
"description": "A path which can be a pure JSON Path, an alias or a aggregation of an alias and a JSON Path", | |
"type": "string" | |
}, | |
"Given": { | |
"oneOf": [ | |
{ | |
"$ref": "#/$defs/Path" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"$ref": "#/$defs/Path" | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment