Files
bookhoard/bruno-yaml/collections/scenarios/Test Collection Rules - Empty Rules Array.yml
T

30 lines
907 B
YAML

info:
name: Test Collection Rules - Empty Rules Array
type: http
seq: 5
http:
method: POST
url: '{{base_url}}/api/collections/test-rules'
auth: inherit
body:
type: json
jsonBody: "{\n \"rules\": []"
headers:
- key: Content-Type
value: application/json
- key: Authorization
value: Bearer {{authToken
docs: |-
## Test Collection Rules - Empty Rules Array
Tests validation behavior when providing an empty rules array.
**Expected Result:** 400 Bad Request
**Validation Rule:** rules array must contain at least one rule object.
**Purpose:** Ensures the API properly validates input and rejects empty rule sets, preventing accidental queries that would return all books or cause performance issues.
**Use Case:** Client-side validation should prevent sending empty rules, but the API should also validate to catch malformed requests.