FAQ

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

    owaspCheckErrorResponse


    owaspCheckErrorResponse will check if a response has been defined for a given status code.

    How do I use this function?

    This function is configured by the following functionOptions.

    NAME TYPE REQUIRED? DESCRIPTION
    code string yes The code you want to look for (401 etc.)

    Example ruleset configuration

    my-security-rule:
      description: "OWASP API Security recommends defining schemas for all responses, even error: 401"
      type: validation
      given: $
      then:
        function: owaspCheckErrorResponse
        functionOptions:
          code: 401 
    

    Used by the following rules: