feat(json,yaml): added support for redactor function by fredbi · Pull Request #111 · go-openapi/testify (original) (raw)
JSON and YAML assertions (generic variants only) now accept a function in addition to the usual string|[]byte inputs.
This allows for dynamic parameterization and redaction of expected or actual values before a comparison.
Upstream reference: stretchr#1840
Change type
Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update
Short description
Fixes
Full description
Checklist
- I have signed all my commits with my name and email (see DCO. This does not require a PGP-signed commit
- I have rebased and squashed my work, so only one commit remains
- I have added tests to cover my changes.
- I have properly enriched go doc comments in code.
- I have properly documented any breaking change.