Answer
Generate alerts only for changes that can affect request processing or validation – i.e., breaking changes and validation errors. Suppress alerts for purely non‑breaking edits such as reordered parameters, description tweaks, added optional fields, or vendor‑extension changes unless your team explicitly marks those extensions as breaking.
Confirmed facts
- Swagger UI’s built‑in validation shows an alert only when a request would fail due to missing required parameters, type mismatches, or format violations.
- OpenAPI‑Diff and Spectral can be configured to treat the following as breaking: removal of a required parameter, change of a parameter/type to an incompatible schema, change of response media type, or change of a default value that alters the contract.
- Reordering of parameters, adding optional fields, updating descriptions, or adding/removing vendor extensions (x‑*) do not alter request validation and are therefore non‑breaking by default.
- Duplicate alerts originating from the same schema element across multiple operations can be deduplicated using the operationId or the path+method pair as a key.
- Swagger UI plugins allow setting a severity threshold (e.g., show only ERROR and WARN) and silencing low‑impact categories via configuration.
Likely explanation
Noise arises because diff tools flag any syntactic change, even when the semantic contract stays the same. Validation‑only alerts focus on what actually impacts client‑server interaction, while treating vendor extensions as non‑breaking avoids false positives unless the team has a policy that treats specific x‑* extensions as contract‑defining.
Steps to implement a low‑noise alert pipeline
- Define a breaking‑change checklist (e.g., Spectral ruleset):
- required → optional removal
- type/format change that is not backward compatible
- response media type removal
- default value change that alters semantics
- any vendor extension marked as “breaking” in your policy
- Configure Spectral/OpenAPI‑Diff to run this ruleset in CI and output only ERROR level results.
- Enable deduplication: group alerts by operationId (or path+method) so each unique contract issue appears once.
- In Swagger UI, set the validation severity filter to show only ERROR (and optionally WARN) and disable informational rules via the plugin’s
validatorUrl or plugin configuration.
- Add a CI step that fails the build if any alert passes the filter, ensuring only meaningful changes block merges.
To finalize the rule set, please confirm whether your team treats any vendor‑extension changes as breaking or if they should remain non‑breaking by default.