info: name: Test Collection Rules - No Matches type: http seq: 4 http: method: POST url: '{{base_url}}/api/collections/test-rules' auth: inherit body: type: json jsonBody: "{\n \"rules\": [\n {\n \"field\": \"genre\",\n \ \ \"operator\": \"equals\",\n \"value\": \"NonExistentGenre123456\"" headers: - key: Content-Type value: application/json - key: Authorization value: Bearer {{authToken docs: |- ## Test Collection Rules - No Matches Tests behavior when collection rules don't match any books in the library. **Example Use Case:** Validating that a new genre name doesn't exist before creating a collection for it, or testing edge cases. **Expected Result:** 200 OK with empty matches array and total: 0 **Purpose:** Verifies that the API handles zero-match scenarios gracefully: - Returns 200 (success) not 404 - Returns empty array, not null - Returns total: 0 for clarity - No errors thrown for no results **Note:** An empty result set is a valid response and doesn't indicate an error. This allows users to test rules confidently before creating collections.