specshield 3.2.2 → 3.2.4

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
@@ -1,5 +1,80 @@
1
1
  # SpecShield CLI changelog
2
2
 
3
+ ## 3.2.3 — 2026-05-28 — BDCT fidelity: HAR capture + provider conformance
4
+
5
+ Two new `bdct` sub-commands that close the contract-fidelity gap PactFlow
6
+ historically owned — both **fully local, no API token, nothing uploaded**,
7
+ language-agnostic, and built mature with full test coverage (60 new tests).
8
+
9
+ ### Added
10
+
11
+ - **`specshield bdct capture from-har`** — record real test traffic, get an
12
+ accurate OpenAPI consumer contract. Reads a HAR file (any browser /
13
+ Cypress / Playwright / k6 / Charles can export one), filters to the
14
+ provider's host, and emits an OpenAPI 3.0 subset describing only the
15
+ endpoints + fields the consumer actually called and read. No Pact DSL.
16
+
17
+ - Context-aware path templating: `/users/123` → `/users/{userId}`
18
+ (param named from the preceding noun, not a generic `{id}`).
19
+ - Per-status schema merging across all samples: fields seen in EVERY
20
+ sample stay `required`, fields seen in only SOME become optional;
21
+ `integer + number` widens to `number`; type conflict falls back to
22
+ the more permissive type.
23
+ - Detects common formats (`uuid`, `date-time`, `email`).
24
+ - Filters: `--base-url`, `--method`, `--include-non-json`.
25
+ - Output: YAML (default) or JSON; feeds straight into
26
+ `bdct publish-consumer --format OPENAPI`.
27
+
28
+ - **`specshield bdct verify-provider`** — active spec-vs-production
29
+ conformance (Dredd-style, in CI). Fires probes derived from your
30
+ OpenAPI spec at a running provider (typically staging) and validates
31
+ every response body against the spec's schema for that status code.
32
+ Catches the "spec says X but live API returns Y" drift that BDCT
33
+ alone can't see.
34
+
35
+ - **Safe by default**: probes only `GET`, `HEAD`, `OPTIONS` —
36
+ `--include-mutating` is required to also probe `POST`/`PUT`/
37
+ `PATCH`/`DELETE`. Never side-effects staging data accidentally.
38
+ - Validates type, format (uuid/date-time/email/…), required fields,
39
+ enums, `nullable: true`, and status-code coverage (exact / wildcard
40
+ `4XX` / `default`).
41
+ - Path-parameter resolution: `--path-params` CLI overrides win,
42
+ else spec `parameters[].example`, else **SKIPPED** with a reason
43
+ (never guesses).
44
+ - Network errors → `ERROR` result, never thrown — a single flaky
45
+ endpoint doesn't kill the whole run.
46
+ - Human report + summary, or `--json` for CI parsing. Exit `1` on
47
+ any FAIL/ERROR.
48
+
49
+ - **README rewrite** — surfaces both new commands as first-class
50
+ sections; removed two outdated visuals; pricing/tier copy updated
51
+ to **Free / Team / Enterprise**; vs-Alternatives extended with
52
+ Specmatic and Microcks. Reference sections moved to the bottom for
53
+ better promotion flow.
54
+
55
+ ### Dependencies
56
+
57
+ - Added `ajv@^8` + `ajv-formats@^3` for JSON-schema validation of
58
+ responses in `verify-provider`.
59
+ - Added `@apidevtools/swagger-parser@^10` for OpenAPI parsing +
60
+ `$ref` resolution.
61
+
62
+ ### Internal
63
+
64
+ - New module trees under `src/core/har/` (HAR ingest pipeline) and
65
+ `src/core/conformance/` (active probing engine).
66
+ - 60 new tests: `tests/harCaptureCore.test.js` (33) +
67
+ `tests/conformance.test.js` (27 — including 6 end-to-end against a
68
+ real in-process `http.Server`). Full CLI suite: **249 passing**.
69
+
70
+ ### Backwards compatibility
71
+
72
+ - Pure additions — no breaking changes to existing commands or flags.
73
+ - `bdct capture` and `bdct verify-provider` are new sub-commands;
74
+ every existing `bdct` flow continues to work unchanged.
75
+
76
+ ---
77
+
3
78
  ## 3.2.0 — 2026-05-17 — Conversion fixes
4
79
 
5
80
  Three CLI changes designed to make the Cloud features (history, share URLs,