Skip to content

Commit

Permalink
docs: add docs about built-in rulesets (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya authored Jun 20, 2024
1 parent 4da0f9c commit 01be22e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 01be22e

Please sign in to comment.