OpenAPI Generator

OpenAPI Generator

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

Config Options for swift5

OptionDescriptionValuesDefault
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
ensureUniqueParamsWhether to ensure parameter names are unique in an operation (rename parameters that are not).true
hideGenerationTimestampHides the generation timestamp when files are generated.true
lenientTypeCastAccept and cast values for simple types (string->bool, string->int, int->string)false
libraryLibrary template (sub-template) to use
urlsession
[DEFAULT] HTTP client: URLSession
alamofire
HTTP client: Alamofire
urlsession
nonPublicApiGenerates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)null
objcCompatibleAdd additional properties and methods for Objective-C compatibility (default: false)null
podAuthorsAuthors used for Podspecnull
podDescriptionDescription used for Podspecnull
podDocumentationURLDocumentation URL used for Podspecnull
podHomepageHomepage used for Podspecnull
podLicenseLicense used for Podspecnull
podScreenshotsScreenshots used for Podspecnull
podSocialMediaURLSocial Media URL used for Podspecnull
podSourceSource information used for Podspecnull
podSummarySummary used for Podspecnull
podVersionVersion used for Podspecnull
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
projectNameProject name in Xcodenull
responseAsOptionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine are available.null
sortModelPropertiesByRequiredFlagSort model properties to place required parameters before optional parameters.true
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
swiftUseApiNamespaceFlag to make all the API classes inner-class of {{projectName}}APInull

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By

LANGUAGE PRIMITIVES

  • Any
  • AnyObject
  • Bool
  • Character
  • Data
  • Date
  • Decimal
  • Double
  • Float
  • Int
  • Int32
  • Int64
  • String
  • URL
  • UUID
  • Void

RESERVED WORDS

  • #available
  • #colorLiteral
  • #column
  • #else
  • #elseif
  • #endif
  • #file
  • #fileLiteral
  • #function
  • #if
  • #imageLiteral
  • #line
  • #selector
  • #sourceLocation
  • Any
  • AnyObject
  • Array
  • Bool
  • COLUMN
  • Character
  • Class
  • ClosedRange
  • Codable
  • CountableClosedRange
  • CountableRange
  • Data
  • Decodable
  • Dictionary
  • Double
  • Encodable
  • Error
  • ErrorResponse
  • FILE
  • FUNCTION
  • Float
  • Float32
  • Float64
  • Float80
  • Int
  • Int16
  • Int32
  • Int64
  • Int8
  • LINE
  • OptionSet
  • Optional
  • Protocol
  • Range
  • Response
  • Self
  • Set
  • StaticString
  • String
  • Type
  • UInt
  • UInt16
  • UInt32
  • UInt64
  • UInt8
  • URL
  • Unicode
  • Void
  • _
  • as
  • associatedtype
  • associativity
  • break
  • case
  • catch
  • class
  • continue
  • convenience
  • default
  • defer
  • deinit
  • didSet
  • do
  • dynamic
  • dynamicType
  • else
  • enum
  • extension
  • fallthrough
  • false
  • fileprivate
  • final
  • for
  • func
  • get
  • guard
  • if
  • import
  • in
  • indirect
  • infix
  • init
  • inout
  • internal
  • is
  • lazy
  • left
  • let
  • mutating
  • nil
  • none
  • nonmutating
  • open
  • operator
  • optional
  • override
  • postfix
  • precedence
  • prefix
  • private
  • protocol
  • public
  • repeat
  • required
  • rethrows
  • return
  • right
  • self
  • set
  • static
  • struct
  • subscript
  • super
  • switch
  • throw
  • throws
  • true
  • try
  • typealias
  • unowned
  • var
  • weak
  • where
  • while
  • willSet
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))