norn-cli 1.1.4 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  All notable changes to the "Norn" extension will be documented in this file.
4
4
 
5
+ ## [1.2.1] - 2026-02-03
6
+
7
+ ### Added
8
+ - **Inline headers for API endpoints**: Stack custom headers below endpoint calls from `.nornapi` files
9
+ - Example: `GET Login` followed by `x-api-key: "my-key"` on the next line
10
+ - Mix inline headers with header groups (e.g., `Common`)
11
+ - Inline headers take precedence over header group values
12
+ - Syntax highlighting for inline headers after API endpoint calls
13
+
14
+ ### Improved
15
+ - **IntelliSense for header values**: After selecting `Content-Type`, IntelliSense automatically triggers to show content type options (`application/json`, etc.)
16
+ - **Removed snippet tab stops**: Header completions no longer leave you in snippet mode requiring Tab to exit
17
+ - **Better trigger characters**: Added `:` as trigger character for immediate header value suggestions
18
+
19
+ ## [1.2.0] - 2026-02-02
20
+
21
+ ### Added
22
+ - **Swagger API Coverage**: See percentage coverage of your OpenAPI/Swagger endpoints
23
+ - Status bar indicator shows coverage percentage when swagger specs are detected
24
+ - Click to open detailed coverage panel with per-endpoint breakdown
25
+ - Coverage tracks asserted status codes (200, 400, 404, etc.) per endpoint
26
+ - Supports wildcard matching (2xx, 4xx, 5xx)
27
+ - Only counts `test sequence` blocks toward coverage
28
+ - CodeLens on swagger lines shows coverage at a glance
29
+ - Automatic recalculation after test execution
30
+ - Caches swagger specs for performance
31
+
5
32
  ## [1.1.4] - 2026-02-02
6
33
 
7
34
  ### Fixed
package/README.md CHANGED
@@ -14,6 +14,7 @@ A powerful REST client extension for VS Code with sequences, assertions, environ
14
14
  - **Sequences**: Chain multiple requests with response capture using `$N.path`
15
15
  - **Test Sequences**: Mark sequences as tests with `test sequence` for CLI execution
16
16
  - **Test Explorer**: Run tests from VS Code's Testing sidebar with colorful output
17
+ - **Swagger Coverage**: Track API coverage with status bar indicator and detailed panel
17
18
  - **Parameterized Tests**: Data-driven testing with `@data` and `@theory` annotations
18
19
  - **Sequence Tags**: Tag sequences with `@smoke`, `@team(CustomerExp)` for filtering in CI/CD
19
20
  - **Secret Variables**: Mark sensitive environment variables with `secret` for automatic redaction
@@ -841,6 +842,41 @@ jobs:
841
842
 
842
843
  ## Syntax Reference
843
844
 
845
+ ### Swagger API Coverage
846
+
847
+ Track how much of your OpenAPI/Swagger spec is covered by tests:
848
+
849
+ - **Status Bar**: Shows coverage percentage when a `.nornapi` file has a `swagger` URL
850
+ - **Coverage Panel**: Click the status bar to see detailed per-endpoint coverage
851
+ - **Per Status Code**: Each response code (200, 400, 404) counts separately toward 100%
852
+ - **Wildcard Support**: Assert `2xx` to match 200, 201, 204, etc.
853
+ - **Test Sequences Only**: Only `test sequence` blocks count toward coverage
854
+ - **CodeLens**: Coverage shown on swagger import lines
855
+
856
+ Coverage is calculated by analyzing your test sequences for:
857
+ 1. API calls by endpoint name (e.g., `GET GetPetById`)
858
+ 2. Status assertions (e.g., `assert $1.status == 200`)
859
+
860
+ ```bash
861
+ # In your .nornapi file:
862
+ swagger https://petstore.swagger.io/v2/swagger.json
863
+
864
+ GetOrderById: GET https://petstore.swagger.io/v2/store/order/{orderId}
865
+ ```
866
+
867
+ ```bash
868
+ # In your .norn test file:
869
+ test sequence OrderTests
870
+ # This covers GET /store/order/{orderId} with 200
871
+ var order = GET GetOrderById(1)
872
+ assert order.status == 200
873
+
874
+ # This covers GET /store/order/{orderId} with 404
875
+ var notFound = GET GetOrderById(999999)
876
+ assert notFound.status == 404
877
+ end sequence
878
+ ```
879
+
844
880
  | Syntax | Description |
845
881
  |--------|-------------|
846
882
  | `var name = value` | Declare a variable (literal) |