Daniel Tischner
08/22/2022, 10:03 AM0.12, 0.35 or 0.5 etc. Essentially, it is "percentage" with maximal 2 digits after the separator.
How would I add this to my contract?
decimalType allows all kinds of decimals, such as -1234.23456
stringMatcher will make it a string type instead of decimal
Is there maybe some more general matches(...) which I could then tell the type + a custom regex matching?
If not, how could I implement what I need as extension? Any hints?
While at it, what about other similar stuff, such as "any positive number"?uglyog
uglyog
Daniel Tischner
08/23/2022, 6:54 AMstringMatcher it would make it a string, i.e. "123" instead of a number type in json 123 in the generated json request/response.
I need it to be a number type, but still want to have a matcher on it - didnt find any method for that at first glancerholshausen
08/25/2022, 12:06 AMrholshausen
08/25/2022, 12:17 AMTimothy Jones
08/25/2022, 4:55 AMEssentially, it is "percentage" with maximal 2 digits after the separator.This is an aside, but personally I would do this with a string instead of a number. That way I would have full control, rather than it come down to how the number was serialised by whatever JSON library wrote it.
Daniel Tischner
08/26/2022, 11:28 AMDaniel Tischner
08/26/2022, 11:44 AM