Open ngm opened 8 years ago
I haven't tested it very thoroughly, but the following change works for me for now:
https://github.com/ngm/WebApiProxy/commit/babd3d2b163880505a1ea77d9704cf77d02ae72a
Basically - if it's a Nullable<DateTime>
, then ToString("o")
its .Value
, otherwise return the empty string.
If I create a method on an ApiController with a nullable DateTime as a parameter, e.g.:
When generating the C# client with
WebApiProxy-Generate-CSharp
, I get the following code in WebApiProxy.generated.cs:The calls to
nullableDate.ToString("o")
produce the following error:Is there a way to get around this?