Priority 3 (largest). packages/dredd/lib/vendor/gavel.js is a ~10k-line bundled build of the abandoned apiaryio/gavel.js (see lib/vendor/README.md). Dredd uses one entry point, gavel.validate(expected, real). The OpenAPI 3.1 path already bypasses Gavel for bodies via validateBodySchemaWithAjv (TransactionRunner.js).
Strategy (incremental)
- Extend in-house validation to cover what Gavel does for headers, status code, and structure (it already does 3.1 bodies).
- Run in-house and Gavel in parallel behind a flag; diff results across the existing fixtures to prove parity.
- Switch over per validation aspect, then delete
lib/vendor/gavel.js.
Touches the validation core — must be backed by thorough characterization tests before switching. Do after P1/P2.
Done when
gavel.validate is no longer used, the vendored bundle is removed, and validation behavior is unchanged (proven by fixtures).
Priority 3 (largest).
packages/dredd/lib/vendor/gavel.jsis a ~10k-line bundled build of the abandonedapiaryio/gavel.js(seelib/vendor/README.md). Dredd uses one entry point,gavel.validate(expected, real). The OpenAPI 3.1 path already bypasses Gavel for bodies viavalidateBodySchemaWithAjv(TransactionRunner.js).Strategy (incremental)
lib/vendor/gavel.js.Touches the validation core — must be backed by thorough characterization tests before switching. Do after P1/P2.
Done when
gavel.validateis no longer used, the vendored bundle is removed, and validation behavior is unchanged (proven by fixtures).