OpenAPI Generator

OpenAPI Generator

  • Get Started
  • Generators
  • Roadmap
  • Team
  • FAQ
  • Blog

generators/csharp


id: generator-opts-client-csharp title: Config Options for csharp sidebar_label: csharp


OptionDescriptionValuesDefault
packageNameC# package name (convention: Title.Case).Org.OpenAPITools
packageVersionC# package version.1.0.0
sourceFoldersource folder for generated codesrc
packageGuidThe GUID that will be associated with the C# projectnull
interfacePrefixPrefix interfaces with a community standard or widely accepted prefix.I
targetFrameworkThe target .NET framework version.
v3.5
.NET Framework 3.5 compatible
v4.0
.NET Framework 4.0 compatible
v4.5
.NET Framework 4.5+ compatible
v5.0
.NET Standard 1.3 compatible
uwp
Universal Windows Platform (IMPORTANT: this will be decommissioned and replaced by v5.0)
v4.5
modelPropertyNamingNaming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original namePascalCase
hideGenerationTimestampHides the generation timestamp when files are generated.true
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
useDateTimeOffsetUse DateTimeOffset to model date-time propertiesfalse
useCollectionDeserialize array types to Collection<T> instead of List<T>.false
returnICollectionReturn ICollection<T> instead of the concrete type.false
optionalMethodArgumentC# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).true
optionalAssemblyInfoGenerate AssemblyInfo.cs.true
optionalProjectFileGenerate {PackageName}.csproj.true
optionalEmitDefaultValuesSet DataMember's EmitDefaultValue.false
generatePropertyChangedSpecifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.false
nonPublicApiGenerates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.false
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
netCoreProjectFileUse the new format (.NET Core) for .NET project files (.csproj).false
validatableGenerates self-validatable models.true
useCompareNetObjectsUse KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.false
Last updated on 2019-1-18
OpenAPI Generator
Docs
Customizing GeneratorsWorkflow Integrations
Community
User ShowcaseStack OverflowChat RoomTwitter
More
BlogGitHub RepoStar
Copyright © 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech). (Both "OpenAPI Tools" (https://OpenAPITools.org) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI))