From 01be22e4c80e7e9d49defa2ea83fa97c1cb93222 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:21:34 +0200 Subject: [PATCH] docs: add docs about built-in rulesets (#1025) --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e322c366..77b9b5a53 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,19 @@ Additionally to all the methods declared in the [Parser-API](https://github.com/ ## Spectral rulesets -[Spectral](https://github.com/stoplightio/spectral) powers the validation of AsyncAPI documents within ParserJS. For this reason, it is possible to use your rulesets/rules or overwrite existing ones, passing the `ruleset` option to the Parser instance: +[Spectral](https://github.com/stoplightio/spectral) powers the validation of AsyncAPI documents within ParserJS. +The default [built-in rulesets](src/ruleset) are: + +- Core ruleset: + - Basic and global validation. Apply to all AsyncAPI Spec versions (with some exceptions). +- Recommended ruleset: + - These are good practices. They won't create validation errors but warnings. +- Specific rulesets per each AsyncAPI Spec version: + - Contain particular rulesets that apply only to documents of a particular Spec version: + - Core rulesets: Rules that generate validation errors if not fulfilled by a particular Spec version. + - Recommended rulesets: Best practices for a particular Spec version + +It is possible to use your rulesets/rules or overwrite existing ones, passing the `ruleset` option to the Parser instance: ```ts import { Parser, stringify, unstringify } from '@asyncapi/parser';