Authors:
@lornajaneLorna Mitchell (Redocly)
There are some words that just should not appear in description fields, but somehow they crop up time and time again. Eliminate them with this configurable rule that will error if they are used.
Tip: If there's a false positive, consider using the ignore file to skip that specific occurrence and keep the rule in place for everything else.
An example of redocly.yaml with a configurable rule:
rules:
rule/descriptions-avoid-words:
subject:
type: any
property: description
assertions:
notPattern: /(simple|random|just)/iEdit the notPattern section to add as many pipe-separated terms as you'd like to exclude.
Acceptable description field:
description: Fetch all registered users in a collection.Unacceptable description field (but choose your own banned words):
description: Fetch all registered users in a simple collection.