@subhamxcod/apiguard 1.0.4 → 1.1.0

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/README.md CHANGED
@@ -31,14 +31,18 @@ old spec + new spec → API Guard → breaking changes (or a clean pass)
31
31
  schemas, security, callbacks, and webhooks — see the [generated rule reference](./docs/rules.md)
32
32
  - **OpenAPI 3.0 and 3.1** — unified normalization: `nullable: true` (3.0) equals
33
33
  `type: ["string", "null"]` (3.1)
34
+ - **AST source mapping** — pinpoint exact source file line and column numbers for every change
35
+ - **Multiple output formats** — terminal, JSON (machine contract), markdown, interactive standalone HTML dashboard, and OASIS SARIF 2.1.0 (for GitHub Code Scanning)
36
+ - **Git & remote spec support** — diff directly against git branches (`--git-base main`, `git://rev:file`) or remote URLs (`https://...`) with built-in SSRF protection
37
+ - **Client impact personas** — evaluate breaking impact against `--profile strict-sdk` or `--profile loose-web`
38
+ - **Changelog & shim generators** — automated Keep-a-Changelog release notes and backward-compatibility gateway shims (Express, Cloudflare Worker, Envoy Lua)
34
39
  - **Semantic, not textual** — YAML formatting, key order, enum order, and `$ref` aliasing are
35
40
  never false positives
36
41
  - **Deterministic** — same inputs produce byte-identical output, on any machine, any locale
37
42
  - **Configurable** — per-rule severities, per-context overrides (`ruleId@context`), and
38
43
  path/operation/schema/rule ignore lists in `apiguard.yaml`
39
44
  - **Semver advice** — suggests major/minor/patch from the detected change kinds
40
- - **Three output formats** — terminal (color), JSON (machine contract), markdown (PR-friendly)
41
- - **GitHub Action** — merge-base baseline by default, PR job summary, `fail-on` policy
45
+ - **GitHub Action** — merge-base baseline, PR job summary, idempotent sticky PR comments, and inline diff annotations
42
46
  - **TypeScript library** — typed, pure API for embedding in your own tooling
43
47
 
44
48
  ## Quick start
@@ -101,7 +105,11 @@ Diff two OpenAPI specs and report breaking changes. This is the core command.
101
105
 
102
106
  | Flag | Effect |
103
107
  | ------------------------ | -------------------------------------------------------- |
104
- | `--json`, `--markdown` | Output format (default: colorized terminal) |
108
+ | `--json`, `--markdown` | Output format shorthands |
109
+ | `--html`, `--sarif` | Interactive standalone HTML dashboard or SARIF 2.1.0 |
110
+ | `--open` | Open interactive HTML report in browser automatically |
111
+ | `--git-base <ref>` | Diff against baseline from git revision or branch |
112
+ | `--profile <p>` | `default`, `strict-sdk`, or `loose-web` |
105
113
  | `--fail-on <level>` | `error` (default) \| `warning` \| `never` |
106
114
  | `--strict` | Shorthand for `--fail-on warning --include-non-breaking` |
107
115
  | `--include-non-breaking` | Also render warning + info changes |
@@ -119,6 +127,14 @@ Diff two OpenAPI specs and report breaking changes. This is the core command.
119
127
  Machine contract: `--json` emits a versioned report (`schemaVersion: "1.0"`) with
120
128
  `summary.bySeverity`, per-change `ruleId`/`severity`/`kind`, and stable change ids.
121
129
 
130
+ ### `apiguard changelog <old-spec> <new-spec>`
131
+
132
+ Generate Keep-a-Changelog formatted release notes grouped by breaking changes, additions, and updates.
133
+
134
+ ### `apiguard codegen-shim <old-spec> <new-spec>`
135
+
136
+ Synthesize backward-compatibility gateway middleware (`express`, `cloudflare-worker`, `envoy-lua`) for breaking changes.
137
+
122
138
  ### `apiguard validate <spec>`
123
139
 
124
140
  Load and semantically validate one spec. `--strict` exits 1 when semantic warnings exist.