---
rules:
  openapi-request-bodies-delete-error:
    description: >-
      DELETE HTTP methods should not have a request body, keeping API requests
      compliant with the HTTP standard
    message: DELETE Request Body
    given: $.paths.*.delete
    severity: error
    then:
      field: requestBody
      function: falsy
  openapi-request-bodies-delete-info:
    description: >-
      DELETE HTTP methods should not have a request body, keeping API requests
      compliant with the HTTP standard
    message: DELETE Request Body
    given: $.paths.*.delete
    severity: info
    then:
      field: requestBody
      function: truthy
  openapi-request-bodies-get-error:
    description: >-
      GET HTTP methods should not have a request body, keeping API requests
      compliant with the HTTP standard
    message: GET Request Body
    given: $.paths.*.get
    severity: error
    then:
      field: requestBody
      function: falsy
  openapi-request-bodies-get-info:
    description: >-
      GET HTTP methods should not have a request body, keeping API requests
      compliant with the HTTP standard
    message: GET Request Body
    given: $.paths.*.get
    severity: info
    then:
      field: requestBody
      function: truthy
  openapi-request-body-on-post-error:
    description: >-
      POST HTTP methods can have a request body, providing a structured payload
      for configuring each API request
    message: POST Requests MUST Have a Body
    given: $.paths.*.post
    severity: error
    then:
      field: requestBody
      function: truthy
  openapi-request-body-on-post-info:
    description: >-
      POST HTTP methods can have a request body, providing a structured payload
      for configuring each API request
    message: POST Requests Has a Body
    given: $.paths.*.post
    severity: info
    then:
      field: requestBody
      function: falsy
  openapi-request-bodies-put-error:
    description: >-
      PUT HTTP methods can have a request body, providing a structured payload
      for configuring each API request
    message: PUT Requests MUST Have a Body
    given: $.paths.*.put
    severity: error
    then:
      field: requestBody
      function: truthy
  openapi-request-bodies-put-info:
    description: >-
      PUT HTTP methods can have a request body, providing a structured payload
      for configuring each API request
    message: PUT Requests Has a Body
    given: $.paths.*.put
    severity: info
    then:
      field: requestBody
      function: falsy