From 38c2251715bef3dc6e5c9eae846ba16d2475a162 Mon Sep 17 00:00:00 2001 From: Kaushal Vora Date: Fri, 16 May 2025 14:49:38 +0530 Subject: [PATCH] Removed wildcard support example from filter doc --- documentation/contract_tests.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/documentation/contract_tests.md b/documentation/contract_tests.md index 2150b6c7b..2b2fae05d 100644 --- a/documentation/contract_tests.md +++ b/documentation/contract_tests.md @@ -964,7 +964,7 @@ specmatic test --filter="METHOD='POST' && PATH='/users'" |----------|-----------------------------------------------------------------------------| | `METHOD` | Filter by HTTP methods (GET, POST, etc.) | | `PATH` | Filter by request paths (`/users`, `/products`, etc.) | -| `STATUS` | Filter by response status codes (200, 400, etc.) — supports pattern matching with `xx` (e.g., 4xx, 2xx) | +| `STATUS` | Filter by response status codes (200, 400, etc.) | | `HEADERS`| Filter by request headers name | | `QUERY` | Filter by query parameters name | @@ -980,12 +980,12 @@ specmatic test --filter="METHOD='POST' && PATH='/users'" 1. Run only successful response tests: ```bash -specmatic test --filter="STATUS='2xx'" +specmatic test --filter="STATUS='200'" ``` 2. Skip 4xx error tests: ```bash -specmatic test --filter="STATUS!='4xx'" +specmatic test --filter="STATUS<'400' && STATUS>'499'" ``` 3. Skip specific status codes: @@ -1038,7 +1038,6 @@ System.setProperty("filter", "STATUS!='400,401'"); - Within a single filter with multiple values, tests matching **ANY** value will be included (**OR** operation). - **Negation(!)** causes a block to be excluded from being considered. - **Wildcard(*)** can only be used with **PATH**. -- **Range (2xx, 50x)** can only be used with **STATUS**. > **Note:** Endpoints that are filtered out as a result of this expression are also excluded from the reports generated by Specmatic and from the coverage calculation.