ajv-keywords icon indicating copy to clipboard operation
ajv-keywords copied to clipboard

Replace existing keywords?

Open iainsproat opened this issue 1 year ago • 0 comments
trafficstars

I have forked this repository and defined a new keyword secret, which transforms the data into a redacted string. e.g. apiKey123 is transformed into ******.

Ideally I would like to not have to define a custom keyword, secret, and instead use the existing keyword writeOnly to trigger this same behaviour.

If I attempt to define behaviour for the keyword, I receive the following error message: Keyword writeOnly is already defined.

Is it possible to monkey patch (or similar) the existing behaviour for the writeOnly keyword?

iainsproat avatar Dec 08 '23 09:12 iainsproat