OpenAPI Generator

OpenAPI Generator

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

Config Options for csharp-netcore

OptionDescriptionValuesDefault
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
caseInsensitiveResponseHeadersMake API response's headers case-insensitivefalse
hideGenerationTimestampHides the generation timestamp when files are generated.true
interfacePrefixPrefix interfaces with a community standard or widely accepted prefix.I
modelPropertyNamingNaming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original namePascalCase
netCoreProjectFileUse the new format (.NET Core) for .NET project files (.csproj).false
nonPublicApiGenerates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.false
optionalAssemblyInfoGenerate AssemblyInfo.cs.true
optionalEmitDefaultValuesSet DataMember's EmitDefaultValue.false
optionalMethodArgumentC# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).true
optionalProjectFileGenerate {PackageName}.csproj.true
packageGuidThe GUID that will be associated with the C# projectnull
packageNameC# package name (convention: Title.Case).Org.OpenAPITools
packageVersionC# package version.1.0.0
returnICollectionReturn ICollection<T> instead of the concrete type.false
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
sourceFoldersource folder for generated codesrc
targetFrameworkThe target .NET framework version.
netstandard1.3
.NET Standard 1.3 compatible
netstandard1.4
.NET Standard 1.4 compatible
netstandard1.5
.NET Standard 1.5 compatible
netstandard1.6
.NET Standard 1.6 compatible
netstandard2.0
.NET Standard 2.0 compatible
netcoreapp2.0
.NET Core 2.0 compatible
netstandard2.0
useCollectionDeserialize array types to Collection<T> instead of List<T>.false
useDateTimeOffsetUse DateTimeOffset to model date-time propertiesfalse
validatableGenerates self-validatable models.true

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By
arrayList
listList
mapDictionary

LANGUAGE PRIMITIVES

  • Boolean
  • Collection
  • DateTime
  • DateTime?
  • DateTimeOffset
  • DateTimeOffset?
  • Dictionary
  • Double
  • Float
  • Guid
  • Guid?
  • ICollection
  • Int32
  • Int64
  • List
  • Object
  • String
  • System.IO.Stream
  • bool
  • bool?
  • byte[]
  • decimal
  • decimal?
  • double
  • double?
  • float
  • float?
  • int
  • int?
  • long
  • long?
  • string

RESERVED WORDS

  • Client
  • abstract
  • as
  • base
  • bool
  • break
  • byte
  • case
  • catch
  • char
  • checked
  • class
  • client
  • const
  • continue
  • decimal
  • default
  • delegate
  • do
  • double
  • else
  • enum
  • event
  • explicit
  • extern
  • false
  • finally
  • fixed
  • float
  • for
  • foreach
  • goto
  • if
  • implicit
  • in
  • int
  • interface
  • internal
  • is
  • localVarFileParams
  • localVarFormParams
  • localVarHeaderParams
  • localVarHttpContentType
  • localVarHttpContentTypes
  • localVarHttpHeaderAccept
  • localVarHttpHeaderAccepts
  • localVarPath
  • localVarPathParams
  • localVarPostBody
  • localVarQueryParams
  • localVarResponse
  • localVarStatusCode
  • lock
  • long
  • namespace
  • new
  • null
  • object
  • operator
  • out
  • override
  • parameter
  • params
  • private
  • protected
  • public
  • readonly
  • ref
  • return
  • sbyte
  • sealed
  • short
  • sizeof
  • stackalloc
  • static
  • string
  • struct
  • switch
  • this
  • throw
  • true
  • try
  • typeof
  • uint
  • ulong
  • unchecked
  • unsafe
  • ushort
  • using
  • virtual
  • void
  • volatile
  • while
Last updated on 1/20/2020
  • IMPORT MAPPING
  • INSTANTIATION TYPES
  • LANGUAGE PRIMITIVES
  • RESERVED WORDS
OpenAPI Generator
Docs
Customizing GeneratorsWorkflow Integrations
Community
User ShowcaseStack OverflowChat RoomTwitter
More
BlogGitHub RepoStar
Copyright © 2020 OpenAPI-Generator Contributors (https://openapi-generator.tech). (Both "OpenAPI Tools" (https://OpenAPITools.org) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI))