Closed jhonnycano closed 6 years ago
It is because by default it is following a ruby like syntax for member accessor by transforming them to lower case and adding a _
previously to a change of upper case (not on the first one). So in your case only the name
property is used. It is explained in the Member renamer
This is rather unexpected and non-obvious behaviour. I would have expected that automatic member renaming would not be the default, at least for non-liquid style parsing.
The documentation linked is also incorrect, MemberRenamerDelegate expects a string to be returned, not a MemberInfo.
This is rather unexpected and non-obvious behaviour. I would have expected that automatic member renaming would not be the default, at least for non-liquid style parsing.
scriban is following how liquid templates are behaving by default. If you want to improve the documentation on this matter, PR welcome.
The documentation linked is also incorrect, MemberRenamerDelegate expects a string to be returned, not a MemberInfo.
Indeed, will fix that. At some point, the MemberRenamerDelegate
was taking a string instead of a MemberInfo
.
When model has Upper case properties, Render emits empty string.
This is the test I've done.