Amit Joshi 1e4f4ab9f2 [aspnetcore] Support async tasks and some code cleanups (#2629)
* Add first cutasync support and small cleanups

* Add apiPackage, modePacke to use for namespaces, for library don't generate wwwroot and dont make model class partial and default to no swashbuckle,  , workarodun empty string cliOption

* Update docs

* Don't add async for library

* Fix generated program for async and task

* Default models names space should be <package>.Models

* Remove commented out code

* Remove unnecessary code, fix a comparison and add an else fo an if statment.

* Update docs
2019-04-20 00:32:04 +08:00

2.0 KiB


id: generator-opts-server-aspnetcore title: Config Options for aspnetcore sidebar_label: aspnetcore

Option Description Values Default
licenseUrl The URL of the license http://localhost
licenseName The name of the license NoLicense
packageCopyright Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file. No Copyright
packageAuthors Specifies Authors property in the .NET Core project file. OpenAPI
packageTitle Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file. OpenAPI Library
packageName C# package name (convention: Title.Case). Org.OpenAPITools
packageVersion C# package version. 1.0.0
packageGuid The GUID that will be associated with the C# project null
sourceFolder source folder for generated code src
compatibilityVersion ASP.Net Core CompatibilityVersion Version_2_1
aspnetCoreVersion ASP.NET Core version: 2.2 (default), 2.1, 2.0 (deprecated) 2.2
sortParamsByRequiredFlag Sort method arguments to place required parameters before optional parameters. true
useDateTimeOffset Use DateTimeOffset to model date-time properties false
useCollection Deserialize array types to Collection<T> instead of List<T>. false
returnICollection Return ICollection<T> instead of the concrete type. false
useSwashbuckle Uses the Swashbuckle.AspNetCore NuGet package for documentation. true
isLibrary Is the build a library false
classModifier Class Modifier can be empty, abstract
operationModifier Operation Modifier can be virtual, abstract or partial virtual
buildTarget Target to build an application or library program
generateBody Generates method body. true
operationIsAsync Set methods to async or sync. false
operationResultTask Set methods result to Task<>. false
modelClassModifier Model Class Modifier can be nothing or partial partial