You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at other templates, e.g. PathParameter, it actually seems there is special-casing the handling of dates and arrays and avoidance of ConvertString.
Why not just pass all handling through ConvertString and put all the special-casing in there, instead of having some of it there and some of it in other templates?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.ConvertToString.liquid does not take into account the
ParameterDateTimeFormat
andParameterDateFormat
options, meaning that if you use this function in another template on a date-(time) field, you end up with an incorrectly formatted string.Looking at other templates, e.g.
PathParameter
, it actually seems there is special-casing the handling of dates and arrays and avoidance ofConvertString
.Why not just pass all handling through
ConvertString
and put all the special-casing in there, instead of having some of it there and some of it in other templates?Beta Was this translation helpful? Give feedback.
All reactions