FAQ

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

    oasOpFormDataConsumeCheck


    oasOpFormDataConsumeCheck will check each parameter and its consumer has the correct type. The function checks for ‘application/x-www-form-urlencoded’ or ‘multipart/form-data’ being set for any parameter being consumed by an operation.

    Example ruleset configuration

    oas2-operation-formData-consume-check:
      description: "Check formData for correct 'consumes' type"
      type: "validation"
      recommended: true
      severity: "warn"
      given: "$"
      then:
        function: "oasOpFormDataConsumeCheck"
    

    The function is used by the oas2-operation-formData-consume-check Rule


    View Function Source