mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 00:21:19 +00:00
[csharp] Options: useCollection, returnICollection
This change is inline with Microsoft's recommended guidelines for collects (https://msdn.microsoft.com/en-us/library/dn169389(v=vs.110).aspx). Added generator options for csharp to: * useCollection: Deserialize responses into and return Collection<T> * returnICollection: For List<T> or Collection<T>, return ICollection<T> instead of the concrete type As a consequence of useCollection, method imputs will also change to Collection<T>.
This commit is contained in:
@@ -26,6 +26,8 @@ public class CSharpClientOptionsProvider implements OptionsProvider {
|
||||
.put(CodegenConstants.OPTIONAL_ASSEMBLY_INFO, "true")
|
||||
.put(CodegenConstants.USE_DATETIME_OFFSET, "true")
|
||||
.put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE)
|
||||
.put(CodegenConstants.USE_COLLECTION, "false")
|
||||
.put(CodegenConstants.RETURN_ICOLLECTION, "false")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user