api-gateway-mapping-template
api-gateway-mapping-template copied to clipboard
String matches does not work
Hello!
First of all, thanks for the lib. It's really useful. However, I can't make this template work
#if( $limit != '' && $limit.matches('^\d$'))
{ "ok": 1 }
#else
{ "ok": 2 }
#end
The payload is
{
"limit": "3"
}
Isn't the matches function a built-in method? I'd love to help to implement this workaround if you instruct me how to do it.
Thanks