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
If a definition in a swagger spec contains a field with format: date, the corresponding c# field is of type NodaTime.ZonedDateTime. This is wrong as a date field itself does not carry any time/time-zone information. One particular problem with this is that the corresponding field is serialized wrongly as a RFC3339 full-time instead of a full-date.
)
* add support for async routes/endpoints
you can now set --optional-properties async=true to generate
a nancyfx server stub that uses asynchronous programming.
(cherry picked from commit 126869c)
* add nancyfx-petstore-server-async.sh to generate sample of async nancyfx.
* Rename async => asyncServer
* update bin/nancyfx-petstore-server-async.sh
* rename async => asyncServer in api.mustache + small bugfix
* run ./bin/nancyfx-petstore-server.sh and ./bin/nancyfx-petstore-server-async.sh
* remove additional new line in api.mustache + add space after if
* run ./bin/nancyfx-petstore-server.sh and ./bin/nancyfx-petstore-server-async.sh
* Map `date` fields to LocalDate c# type + add a JsonConverter for LocalDate.
Description
If a definition in a swagger spec contains a field with
format: date
, the corresponding c# field is of typeNodaTime.ZonedDateTime
. This is wrong as adate
field itself does not carry any time/time-zone information. One particular problem with this is that the corresponding field is serialized wrongly as a RFC3339full-time
instead of afull-date
.Swagger-codegen version
2.3.0-Snapshot
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Generate the nancy client with the above command line and open Bar.cs
Related issues/PRs
There is no related issue that I'm aware of.
Suggest a fix/enhancement
Use
NodaTime.LocalDate
instead and add aNancy.Json.JavaScriptPrimitiveConverter
that uses the RFC3339full-date
pattern.The text was updated successfully, but these errors were encountered: