- Support multiple authentication types per operation #222 @malteburkert
- Fixed inline allOf group generation
- Fixed property generation when there is only one group schema; the first group schema type will be used as the type #217
- Added
anyTypeoption that allows to overrideAnyin models - Fixed date encoding formatter to conform to RFC3339
- Fixed
.swift-versionto use Swift 5.2 instead of Swift 4.1 #246
- Fixed
'??' has non-optional typewarning #207 - Fixed incorrect replacements in server variables #209
- Fixed nullable references not being generated as optionals #216 @alephao
- Removed needless
Arrayinitialization. #212 @RomanPodymov
- Added ability to set nested template options from the command line using dot syntax eg
--option "typeAliases.ID: String"#189 - Added a customizable
jsonEncoderon APIClient #172 #203 - Added support for using a custom encoder per request #172 #203
- List operations by path and then by method to keep the order consistent between code generations #185
- Add
codableResponsesoption that constrains all models and responses to Codable #198 - Add
propertyNamesoption that allow to override the name of properties #196
- Fixed responses from silently failing to parse when missing a
description, which is now an optional property that defaults to an empty string #193 - Add missing custom model protocol name #191
- Fixed missing customization of JSONEncoder instance to encode request's body #147
- Fixed string uploads #161
- Added support for objects in query params #158
- Added support for nullable properties #165
- Removed 3rd party Result framework #174
- Fixed path to
Enum.swifton Linux #157 - Fixed model initializers with multiple levels of inheritance #175
- Decode Swagger specs with no components #180
- Update dependencies
- Added swift template option
enumUndecodableCasethat adds anundecodablecase to enums when decoding fails #141
- Fixed installing in Swift 5 #139
- Fixed Swift template building in Swift 5 by Alamofire #139
- Updated codebase to Swift 5 and dropped Swift 4.2 #139
- Added support for OpenAPISpec/Swagger 3. Support for Swagger 2 has been removed. For that please use release 3.0.2 or the
swagger_2branch #118 #121 - Added StencilSwiftKit support for templates #111
- Added
oneOfandanyOfwith discriminators #121 - Added support for generating inline schemas when they are wrapped in an array #121
- Swagger 3 support #118
- Added generated
Server#118 - Discriminated
oneOfandanyOfenums #121 - Allow both form and path parameters in the same request #118
- Add headers to request #120
- Add framework
Info.plist#117 - Use
safeArrayDecoding#117 - Catch
APIClientErrorfrom RequestBehaviour validation #117 - Added
typeAliasesoption #117 - Validation error changed from a String to an Error #117
- Improve request description and summary #117
- Change
SecurityRequirement.scopestring toSecurityRequirement.scopesarray #117 - Use
StringCodingKeyinstead of enum types #117 - Replace
DateTimewithDate#117 - Update
Alamofiredependency to 4.8.1 #123 - Update
Resultdependency to 4.1.0 #123 - Enums conform to Equatable and CaseIterable #124
- Removed support for Swift 4.1 #124
- Only generate
isEqualin model classes not structs #117 - Fixed path params that don't have swift friendly names #130
- Fixed operations with mutiple success responses and no error responses #127
- Fix nested schemas in subclasses thinking they have a parent #128
- Handle nil
modelProtocoloption #117
- Removed support for Swagger 2 #118
- Removed Swift 4.1 support #134
- Added
exampleanddefaultto the generator
- Changed default date formatter in templates to use
yyyynotYYY#114 - Fixed date formatting of
DateDayproperties #114 - Fixed encoding of dictionary types #113
- Updated to Swift 4.2
- Updated YAMS, Rainbow and SwiftCLI
- Added new
modelProtocoltemplate option which defaults toAPIModel#109
- Fixed crash in Swift template when not using any RequestBehaviours #108
- Added File upload support #103
- Added top level security support #104
- Added
modelTypeoption to Swift template for class or struct models #94 - Added
modelInheritancetemplate option #94 - Added
modelNamesandenumNamestemplate options for overriding names #95 - Added
x-enum-nameproperty to Swagger for custom enum names #98 - Added operation
summaryto generation and template
- Swift template changes #104
- Renamed
APIErrortoAPIClientError - Removed
APIClient.authorizer - Added
RequestBehavour.validate(replacesAPIClient.authorizer) APIClient.makeRequestnow returns aCancellableRequestinstead ofAlamofire.Request- A new
APIClient.jsonDecoderproperty which is used for json requests - Renamed
queuetocompletionQueueinAPIClient.makeRequest - Replaced
APIError. authorizationErrorwithAPIClientError. validationError - Rename
APIService.authorizationtoAPIService.securityRequirement
- Renamed
- Generated type changes in Swift template. You will now have to handle or typealias the following types #104
ID: TheUUIDformat. UsuallyUUIDorStringFile: Thefileformat. UsuallyURL,Dataor a custom type with a mimeType and fileName
- Sort operations in generated Readme
- Better name camel casing #100
- Fix empty string field decoding in YAML #101
- Escape
Protocolin swift templates
- Added generated Swift template documenation #87
- Fixed nil
AnyCodablevalues being encoded as null - Fixed inbuilt templates not being found in Mint installations
- Added support for ASCI encoded swagger specs #80
- Fixed homebrew installation on machines with both Xcode 9.3 and Command line tools installed
- Fixed
UUIDparameter encoding #81
- Separated
dateanddate-timeformats intoDateDayandDateTimestructs #74 #77 - Added new
modelPrefixandmodelSuffixoptions #75
- Fixed regression where request bodies were not being encoding properly #76
- Fixed
safeOptionalDecodingnot working on optional Arrays - Fixed
date-timenot decoding in some cases #77
- Swift template: added
Codablesupport to models #61 - Swift template: added
Equatablesupport to models #63 - Swift template: added
mutableModelsoption #64 - Swift template: added
safeArrayDecodingoption #71 - Swift template: added
safeOptionalDecodingoption #71 - Bundle templates with installation #65
- New
languageargument which defaults toswiftfor now #65 - Default template for language is now used if no template path is specified #65
- Added support for inline anonymous schemas in definitions, body params, and responses #66
- Added UUID support #72
- Added
--silentflag #68 - Added
--verboseflag #68 - Added
--versionflag #68
- Swift template: move sources out of now unnessary subdirectory #62
- Swift template: reorganise template #69
- Swift template: updated dependencies
- Swift template: Update to Swift 4.1
- Updated CLI #68
- Improved error output #68
- Make executable lowercase
swaggen(breaking on linux) #68 - BREAKING generation moved into generate command:
swaggen generate#68 - BREAKING
--spechas changed to a required parameter:swaggen generate path_to_spec#68
- BREAKING Swift template: models no longer have
init(jsonDictionary: JSONDictionary)orencode() -> JSONDictionaryfunctions #61 - Swift template: removed
JSONUtilitiesdependency #61
- Added
fixedWidthIntegersoption to Swift template. Thanks @martinknabbe - Added support for response references #58
- Fixed Swift 4.0.2 warnings
- Fixed Brew install
- Generate typealias for models with reference and array types #42 thanks @Liquidsoul
- generate typealias for models that only have additional properties
- fixed SPM installation issue
- Swift template: decode response on background queue and then call completion on main thread or new
queueparameter
- Updated project to Swift 4 #42
- Updated Swift templates to Swift 4 #42
- Homebrew and Make installations
- Enums now also have a raw property to access original json
- Requests in Swift template are final
- Fixed parameters with a file type not being generated
This includes a large rewrite with a lot more test cases so many more specs should be supported
- Integer, Double and Float enums are now generated
- operation now has
hasFileParamandisFile#27 Thanks @dangthaison91 spec.operationsByTagnow also includes operations without tags with an empty string name #28 Thanks @dangthaison91- Operations now include common parameters defined in the path #29 Thanks @dangthaison91
- Added a bunch of test specs which are now validated against
- Added a script that generates and then compiles all test specs
- Removed symbols from generated filenames
- Generate Floats as
FloatnotDouble - Fixed some array query parameters not joining their contents with the collectionFormat seperator (uses comma delimeted by default now if none is provided)
- Arrays and dictionaries of enums are now encoded
- Arrays of models are now encoded
- Support for a default response with no schema
- Support for
[String: Any]responses - Simple type definitions including enums are generated properly
- Fixed generation of operations without tags
- Enums in responses are now generated
- Overall more solid spec support. For example the whole fake petstore example now generates and compiles properly
- Within templates
tagsis now just a list of all tag names. The previous tag dictionary which containsnameandoperationshas been moved tooperationsByTag - request response enum cases have been renamed
- fixed not building with Swift Package Manager in certain situations
- fixed array bodies being generated as inline classes
- fix compiler error when operations have no default response
- escape built in Swift Foundation types like Error and Data
- escape filenames in different way to class names
- now uses Stencil includes. Paves the way for recursive nested schemas
- changed how operations are decoded. Paves the way for non json responses
- added APIError.name
- made RequestAuthorizer.authorize completed parameter escaping
- add tag to printed request and service descriptions
Added suite of tests for parsing, generating and compiling templates from a list of specs. Will improve stability and help prevent regressions. Still some work to do in this area
- added SuccessType typealias to APIResponseValue. This lets you map from a response to successful value
- Replaced
CustomDebugStringConvertiblewithPrettyPrintedconformance on Models, so you can specify your ownCustomDebugStringConvertible. Same string is available atmodel.prettyPrinted - Moved generated request enums and anonymous schema from APIRequest.Request to one level higher in scope
- A request's response now has a responseResult with either
.success(SuccessValue)or.failure(FailureValue). This is only generated if there is a single schema type for successes responses and a single schema type for failure responses
- Added back
successTypein response context for backwards compatibility with old templates - Updated Alamofire to 4.4.0
- Fixed api name not being replaced in
Decoding.swiftanymore
APIClient.makeRequestnow returns an AlamofireRequestif one was created, so requests can now be cancelled- All operation responses are now generated, not just the successful one, meaning you get access to typed errors
- Properties in a model subclass initialiser will now be ordered so that all required properties come first, instead of parent and then child's properties
- Now provides a
CustomDebugStringConvertibleconformance that pretty prints all nested values
- Each Request now has a typed
Responseenum that includes all it's responses in the spec. Each case has the decoded schema as an associated enum if specified - The actual APIRequest subclass now sits at
MyGetOperation.Request
The APIClient.makeRequest complete closure parameter has changed from DataResponse to APIResponse which:
- replaces result value with the new response enum
- has result error of APIError enum via antitypical/Result which has cases for:
unexpectedStatusCode(statusCode: Int, data: Data)jsonDeserializationError(JSONUtilsError)decodingError(DecodingError)invalidBaseURL(String)authorizationError(AuthorizationError)networkError(Error)unknownError(Error)
Models, Requests, Errors and Responses now have CustomStringConvertible and/or CustomDebugStringConvertible conformances
- Path parameters are no longer also encoded as url parameters in the request template
Improved the generation of complicated specs:
- escape all Swift keywords:
- escape and rename invalid characters
- escape symbols starting with numbers
- better support for deeply nested arrays and dictionaries
- fixed nested enums
- Added generated API Client in Swift template #16
- monitoring and modification of requests via request behaviours
- asynchronous authorization of requests
- central place for api options
- configurable Alamofire SessionManager
- Models now have support for
additionalProperties#15 - Swift template is now Swift Package Manager compatible #17
- New
cleanCI arguement for ignoring dot files #18
- Names and properties in Swift template are now escaped with `` instead of appending
Type,Enum...etc
- Swift names and types are now escaped with a greater range of swift keywords
- Operations with multiple path variables now properly generate an operationId. #11 Thanks @HSchultjan
- Operation parameters that contain anonymous schemas (those that don't reference a definition schema but define a schema inline) are now genererated properly as nested structs within the APIRequest #13
Operation,Definition,PropertyandParameter, now have arawproperty that can be accessed from templates. This represents the raw data that was in the original spec. This lets you access any custom properties you have in your spec
PropertyandParameterhave lost theirrawTypeandrawNameproperties in favour of the above, so they are nowraw.typeandraw.name- Upgraded Stencil to 0.9
- First official release