swagger-api/swagger-codegen

Swift4: Need initializer with default value '=nil'

開放

#6,957 建立於 2017年11月14日

 (2 則留言) (0 個反應) (0 位負責人)HTML (5,474 個分叉)batch import
Client: SwiftEnhancement: GeneralGeneral: Suggestionhelp wanted

倉庫指標

星標
 (12,701 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Description

I am filing this issue to track the discussion which took place in another issue for swift4: #6641

The request was to have a default value '=nil' in the additional initializer for swift4-generated models. Example:

public init(foo: String?=nil, bar: String?=nil) {
        self.foo = foo
        self.bar = bar
}
Swagger-codegen version

All

Swagger declaration file content or url

This is a feature request. See the discussion at the end of the issue listed above for context.

貢獻者指南