SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator

MIT License

Stars
626
Committers
45

Bot releases are hidden (Show)

SwagGen - 4.7.0 Latest Release

Published by yonaskolb over 2 years ago

Changed

  • Expanded IntegerFormat to support more fixed width integers #301 @wqz-leo
  • Append more types of values to MultipartFormData including arrays and dictionaries #293 @0x0c

Fixed

  • Fixed duplicated switch cases when using explicit mappings in oneOf discriminator #297 @JanC
  • Prefer generating composed types (oneOf, anyOf, ..) if the schema contains both type: object and oneOf #302 @JanC
SwagGen - 4.6.0

Published by yonaskolb about 3 years ago

Fixed

  • Fixed compilation with Xcode 13 #282 @sroebert

Changed

  • Improved CodeFormatter efficiency #272 @zntfdr
  • Updated Alamofire used in template to 5.4.4 #283 @0x0c

Commits

SwagGen - 4.5.0

Published by yonaskolb about 3 years ago

Changed

  • Updated Alamore version in the Swift template to be 5.4.3 #273 @0x0c
  • Minimum Swift version in the Swift template is now 5.2 #273 @0x0c
  • Minimum iOS version in the Swift template is now 10 #273 @0x0c

Fixed

  • Fixed sporadic crashes due to malformed URLs #268 @marcelvoss
  • Fixed generation of inline types for allOf #267 @nicholascross, #278 @liamnichols

Commits

SwagGen - 4.4.0

Published by yonaskolb almost 4 years ago

Added

  • Support multiple authentication types per operation #222 @malteburkert
  • Added support for decimal number format #259 @yonaskolb
  • Added numberType, doubleType, floatType and decimalType template options #259 @yonaskolb
  • Added support for binary response bodies #224 @Hustenbonbon

Fixed

  • 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 anyType option that allows to override Any in models
  • Fixed date encoding formatter to conform to RFC3339
  • Fixed .swift-version to use Swift 5.2 instead of Swift 4.1 #246
  • Fixed Server is not defined issue #197

Internal

  • SwagGen minimum Swift version is 5.0

Commits

SwagGen - 4.3.1

Published by yonaskolb over 4 years ago

Fixed

  • Fixed '??' has non-optional type warning #207
  • Fixed incorrect replacements in server variables #209
  • Fixed nullable references not being generated as optionals #216 @alephao

Internal

  • Removed needless Array initialization. #212 @RomanPodymov

Commits

SwagGen - 4.3.0

Published by yonaskolb almost 5 years ago

Added

  • Added ability to set nested template options from the command line using dot syntax eg --option "typeAliases.ID: String" #189
  • Added a customizable jsonEncoder on APIClient #172 #203
  • Added support for using a custom encoder per request #172 #203

Changes

  • List operations by path and then by method to keep the order consistent between code generations #185
  • Add codableResponses option that constrains all models and responses to Codable #198
  • Add propertyNames option that allow to override the name of properties #196

Fixed

  • 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

Commits

SwagGen - 4.2.0

Published by yonaskolb over 5 years ago

Swift Template Changes

  • Added support for objects in query params #158
  • Added support for nullable properties #165
  • Removed 3rd party Result framework #174
  • Fixed path to Enum.swift on Linux #157
  • Fixed model initializers with multiple levels of inheritance #175

Fixes

  • Decode Swagger specs with no components #180

Changes

  • Update dependencies

Commits

SwagGen - 4.1.0

Published by yonaskolb over 5 years ago

Added

  • Added swift template option enumUndecodableCase that adds an undecodable case to enums when decoding fails #141

Fixed

  • Fixed installing in Swift 5 #139
  • Fixed Swift template building in Swift 5 by Alamofire #139

Changed:

  • Updated codebase to Swift 5 and dropped Swift 4.2 #139

Commits

SwagGen - 4.0.0

Published by yonaskolb over 5 years ago

Added

  • Added support for OpenAPISpec/Swagger 3. Support for Swagger 2 has been removed. For that please use release 3.0.2 or the swagger_2 branch #118 #121
  • Added StencilSwiftKit support for templates #111
  • Added oneOf and anyOf with discriminators #121
  • Added support for generating inline schemas when they are wrapped in an array #121

Swift Template Updates

  • Swagger 3 support #118
  • Added generated Server #118
  • Discriminated oneOf and anyOf enums #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 APIClientError from RequestBehaviour validation #117
  • Added typeAliases option #117
  • Validation error changed from a String to an Error #117
  • Improve request description and summary #117
  • Change SecurityRequirement.scope string to SecurityRequirement.scopes array #117
  • Use StringCodingKey instead of enum types #117
  • Replace DateTime with Date #117
  • Update Alamofire dependency to 4.8.1 #123
  • Update Result dependency to 4.1.0 #123
  • Enums conform to Equatable and CaseIterable #124
  • Removed support for Swift 4.1 #124
  • Only generate isEqual in 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 modelProtocol option #117

Removed

  • Removed support for Swagger 2 #118
  • Removed Swift 4.1 support #134

Commits

SwagGen - 3.0.2

Published by yonaskolb over 5 years ago

Added

  • Added example and default to the generator

Fixed

  • Changed default date formatter in templates to use yyyy not YYY #114
  • Fixed date formatting of DateDay properties #114
  • Fixed encoding of dictionary types #113

Internal

  • Updated to Swift 4.2
  • Updated YAMS, Rainbow and SwiftCLI

Commits

SwagGen - 3.0.1

Published by yonaskolb about 6 years ago

Added

  • Added new modelProtocol template option which defaults to APIModel #109

Fixed

  • Fixed crash in Swift template when not using any RequestBehaviours #108

Commits

SwagGen - 3.0.0

Published by yonaskolb about 6 years ago

Added

  • Added File upload support #103
  • Added top level security support #104
  • Added modelType option to Swift template for class or struct models #94
  • Added modelInheritance template option #94
  • Added modelNames and enumNames template options for overriding names #95
  • Added x-enum-name property to Swagger for custom enum names #98
  • Added operation summary to generation and template

Changed

  • Swift template changes #104
    • Renamed APIError to APIClientError
    • Removed APIClient.authorizer
    • Added RequestBehavour.validate (replaces APIClient.authorizer)
    • APIClient.makeRequest now returns a CancellableRequest instead of Alamofire.Request
    • A new APIClient.jsonDecoder property which is used for json requests
    • Renamed queue to completionQueue in APIClient.makeRequest
    • Replaced APIError. authorizationError with APIClientError. validationError
    • Rename APIService.authorization to APIService.securityRequirement
  • Generated type changes in Swift template. You will now have to handle or typealias the following types #104
    • ID: The UUID format. Usually UUID or String
    • File: The file format. Usually URL, Data or a custom type with a mimeType and fileName

Fixed

  • Sort operations in generated Readme
  • Better name camel casing #100
  • Fix empty string field decoding in YAML #101
  • Escape Protocol in swift templates
SwagGen - 2.1.2

Published by yonaskolb over 6 years ago

Added

  • Added generated Swift template documenation #87

Fixed

  • Fixed nil AnyCodable values being encoded as null
  • Fixed inbuilt templates not being found in Mint installations
SwagGen - 2.1.1

Published by yonaskolb over 6 years ago

Added

  • Added support for ASCI encoded swagger specs #80

Fixed

  • Fixed homebrew installation on machines with both Xcode 9.3 and Command line tools installed
  • Fixed UUID parameter encoding #81
SwagGen - 2.1.0

Published by yonaskolb over 6 years ago

Added

  • Separated date and date-time formats into DateDay and DateTime structs #74 #77
  • Added new modelPrefix and modelSuffix options #75

Fixed

  • Fixed regression where request bodies were not being encoding properly #76
  • Fixed safeOptionalDecoding not working on optional Arrays
  • Fixed date-time not decoding in some cases #77
SwagGen - 2.0.0

Published by yonaskolb over 6 years ago

Added

  • Swift template: added Codable support to models #61
  • Swift template: added Equatable support to models #63
  • Swift template: added mutableModels option #64
  • Swift template: added safeArrayDecoding option #71
  • Swift template: added safeOptionalDecoding option #71
  • Bundle templates with installation #65
  • New language argument which defaults to swift for 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 --silent flag #68
  • Added --verbose flag #68
  • Added --version flag #68

Changes

  • 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 --spec has changed to a required parameter: swaggen generate path_to_spec #68

Removed

  • BREAKING Swift template: models no longer have init(jsonDictionary: JSONDictionary) or encode() -> JSONDictionary functions #61
  • Swift template: removed JSONUtilities dependency #61
SwagGen - 1.2.0

Published by yonaskolb almost 7 years ago

Added

  • Added fixedWidthIntegers option to Swift template. Thanks @martinknabbe
  • Added support for response references #58

Fixed

  • Fixed Swift 4.0.2 warnings
  • Fixed Brew install
SwagGen - 1.1.0

Published by yonaskolb about 7 years ago

Added

  • Generate typealias for models with reference and array types #42 thanks @Liquidsoul
  • generate typealias for models that only have additional properties

Fixed

  • fixed SPM installation issue
SwagGen - 1.0.0

Published by yonaskolb about 7 years ago

Added

  • Swift template: decode response on background queue and then call completion on main thread or new queue parameter

Changed

  • Updated project to Swift 4 #42
  • Updated Swift templates to Swift 4 #42
SwagGen - 0.6.1

Published by yonaskolb about 7 years ago

Added

  • Homebrew and Make installations
  • Enums now also have a raw property to access original json

Changed

  • Requests in Swift template are final

Fixed

  • Fixed parameters with a file type not being generated