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

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
ArrayOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3
Last updated on by Sebastien Rosset