[csharp] Fixed issue #1524: useDateTimeOffset not working in openapi generator 3.3.3 (#1544)

* Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI.

* Fixed issue #1524 that caused the `useDateTimeOffset` additional property for the `csharp` generator not to work.
This commit is contained in:
Rubén Martínez 2018-12-04 11:59:16 +01:00 committed by William Cheng
parent e84c59f4cc
commit 110d057384

View File

@ -206,8 +206,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
public void useDateTimeOffset(boolean flag) {
this.useDateTimeOffsetFlag = flag;
if (flag) typeMapping.put("datetime", "DateTimeOffset?");
else typeMapping.put("datetime", "DateTime?");
if (flag) {
typeMapping.put("DateTime", "DateTimeOffset?");
}
else {
typeMapping.put("DateTime", "DateTime?");
}
}
@Override