ajv-keywords
ajv-keywords copied to clipboard
Replace existing keywords?
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?