FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • New! Try the OpenAPI DoctorThe OpenAPI Doctor

    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 TYPE REQUIRED? DESCRIPTION
    minWords integer yes Minimum words that must be included (default is 1)

    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