-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom function validation #29
Add custom function validation #29
Conversation
I'm sorry but I'm going to reject this PR. That said, you can do what you want without any change in KATT by introducing a new validation type e.g.
KlarnaJson =
fun(recall_body) ->
[ fun katt_callbacks_json:recall_body/4
];
fun(parse) ->
[ fun katt_callbacks_json:parse/5
];
fun(validate_body) ->
[ fun katt_callbacks_json:validate_body/3
],
fun(validate_type) ->
[ fun katt_callbacks_json:validate_type/7
, fun klarna_callbacks_json:validate_type/7
],
katt:run("klarna_erlang_scenario.apib", [], [{ext, KlarnaJson}]). where
|
Out of curiousity, what type of validation are you doing in your custom funs? i.e. what validation is not supported by KATT today? |
Okay, Regards Erik On Wed, Feb 24, 2016 at 1:12 PM, Andrei Neculau notifications@github.com
|
There are 3 things we need to do
[ contains at least elements with type elv and invoice. Order in this case is
// Erik On Wed, Feb 24, 2016 at 1:14 PM, Andrei Neculau notifications@github.com
|
|
Cool, we are still running on a pretty old version of katt internally in Thanks for your time On Wed, Feb 24, 2016 at 1:45 PM, Andrei Neculau notifications@github.com
|
This use case rings a bell, a thing I wanted to take care of a while ago. :( |
Ah m) |
add runtime_value/runtime_validation validation type re:#29
This PR allows using user defined functions for validating and reading values from JSON fields.