LoginSignup
4
2

More than 5 years have passed since last update.

Apache VTL すごい

Posted at

Integer.parseInt するために事前に整数を一個宣言しておく必要があるんだって!

$set($Integer = 0)
{
  hoge: $Integer.parseInt($someNumericString)
}

'A';

何に使ったかって言うとこんな感じ

APIGatewayのレスポンスマッピング
#set($Integer = 0)
#set($itemsSize = $Integer.parseInt($input.params('X-Items-Size')))

[
#foreach($elem in [1 .. $itemsSize])
  {
    id: $elem
  }
#end
]

初見キラーすぎる・・・

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2