Rahul Agrawal
10/05/2023, 3:04 PM"body: "{{now}}"
it gives the the desired result
However if I try to use the same in bodyFile and put the {{now}} in the content of the file, it does not seem to have any effect.
Is the syntax to be used different when we put the template in a file using "bodyFile" VS when we inline the template using "body"{{now offset='1 years'}}
while {{now}} does not work.
I am surely missing something.Tom
10/05/2023, 3:51 PMRahul Agrawal
10/05/2023, 3:52 PMTom
10/05/2023, 3:55 PM"transformers": ["response-template"]
on your stub?Rahul Agrawal
10/05/2023, 4:19 PM"response": {
"status": 200,
"bodyFileName" : "1.xml",
"transformers": [
"response-template"
],
"headers": {
"Content-Type": "application/xml"
}
}
my template file is
<RealTimePrice>
<period>125</period>
<reportType>REP</reportType>
<tradingDate>02-Aug-2023</tradingDate>
<A>{{now offset='1 years'}} </A>
<B>{{now}}</B>
<demand>6835.977</demand>
<tcl>0.000</tcl>
<USEP>84.99</USEP>
<lcp>0.00</lcp>
<regulation>.01</regulation>
<primaryReserve>.01</primaryReserve>
<secondaryReserve/>
<contingencyReserve>.1</contingencyReserve>
<eheur>0.50</eheur>
<solar>282.53</solar>
</RealTimePrice>
<RealTimePrice>
<period>125</period>
<reportType>REP</reportType>
<tradingDate>02-Aug-2023</tradingDate>
<A>2024-10-05T16:17:52Z </A>
<B></B>
<demand>6835.977</demand>
<tcl>0.000</tcl>
<USEP>84.99</USEP>
<lcp>0.00</lcp>
<regulation>.01</regulation>
<primaryReserve>.01</primaryReserve>
<secondaryReserve/>
<contingencyReserve>.1</contingencyReserve>
<eheur>0.50</eheur>
<solar>282.53</solar>
</RealTimePrice>
Lee Turner
10/05/2023, 4:30 PM<RealTimePrice>
<period>125</period>
<reportType>REP</reportType>
<tradingDate>02-Aug-2023</tradingDate>
<A>2024-10-05T16:28:26Z</A>
<B>2023-10-05T16:28:26Z</B>
<demand>6835.977</demand>
<tcl>0.000</tcl>
<USEP>84.99</USEP>
<lcp>0.00</lcp>
<regulation>.01</regulation>
<primaryReserve>.01</primaryReserve>
<secondaryReserve/>
<contingencyReserve>.1</contingencyReserve>
<eheur>0.50</eheur>
<solar>282.53</solar>
</RealTimePrice>
Rahul Agrawal
10/05/2023, 4:38 PM{{#each (range 1 3) as |index|}}
<RealTimePrice>
<period>125</period>
<reportType>REP</reportType>
<tradingDate>02-Aug-2023</tradingDate>
<A>{{now offset='1 years'}} </A>
<B>{{now}}</B>
<demand>6835.977</demand>
<tcl>0.000</tcl>
<USEP>84.99</USEP>
<lcp>0.00</lcp>
<regulation>.01</regulation>
<primaryReserve>.01</primaryReserve>
<secondaryReserve/>
<contingencyReserve>.1</contingencyReserve>
<eheur>0.50</eheur>
<solar>282.53</solar>
</RealTimePrice>
{{/each}}
Tom
10/05/2023, 4:46 PM{{#each}}
it’s trying to look up now
as if it’s a piece of data.Lee Turner
10/05/2023, 4:47 PM<B>{{now offset='0 years'}}</B>
Rahul Agrawal
10/05/2023, 4:47 PMTom
10/05/2023, 4:47 PMRahul Agrawal
10/05/2023, 4:47 PMTom
10/05/2023, 4:50 PMRahul Agrawal
10/05/2023, 4:51 PMTom
10/05/2023, 4:51 PMmath
helper with dates, given a bit os wranglingRahul Agrawal
10/05/2023, 4:52 PMTom
10/05/2023, 4:52 PMRahul Agrawal
10/05/2023, 4:53 PM