oasDescriptions


oasDescriptions Checks operation descriptions have been set, and meet a minimum word count.

The function will check for both a description AND a summary. If neither is found, then a warning will be triggered.

How do I use this function?

pattern is configured by the following functionOptions

NAME DESCRIPTION TYPE REQUIRED?
minWords Minimum words that must be included (default is 1) integer yes

Example ruleset configuration

operation-descriptions:
  description: "Operations should have at least 5 words"
  type: "validation"
  recommended: true
  severity: "warn"
  given: "$"
  then:
    function: "oasDescriptions"
    functionOptions:
      minWords: 5

The function is used by the operation-descriptions Rule


View Function Source