forked from loafle/openapi-generator-original
Adding NodaTime types as primitives to keep them nullable.
This commit is contained in:
parent
01145be00d
commit
e52f991d72
@ -90,6 +90,7 @@ public class NancyFXServerCodegen extends AbstractCSharpCodegen {
|
||||
addSwitch(RETURN_ICOLLECTION, RETURN_ICOLLECTION_DESC, returnICollection);
|
||||
addSwitch(IMMUTABLE_OPTION, "Enabled by default. If disabled generates model classes with setters", true);
|
||||
typeMapping.putAll(nodaTimeTypesMappings());
|
||||
languageSpecificPrimitives.addAll(nodaTimePrimitiveTypes());
|
||||
|
||||
importMapping.clear();
|
||||
}
|
||||
@ -387,6 +388,10 @@ public class NancyFXServerCodegen extends AbstractCSharpCodegen {
|
||||
"datetime", "ZonedDateTime?");
|
||||
}
|
||||
|
||||
private static Set<String> nodaTimePrimitiveTypes() {
|
||||
return ImmutableSet.of("LocalTime?", "ZonedDateTime?");
|
||||
}
|
||||
|
||||
private class DependencyInfo {
|
||||
private final String version;
|
||||
private final String framework;
|
||||
|
Loading…
x
Reference in New Issue
Block a user