swagger-api/swagger-codegen

Swift4: Need initializer with default value '=nil'

Ouverte

#6 957 ouverte le 14 nov. 2017

 (2 commentaires) (0 réaction) (0 personne assignée)HTML (5 474 forks)batch import
Client: SwiftEnhancement: GeneralGeneral: Suggestionhelp wanted

Métriques du dépôt

Stars
 (12 701 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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.

Guide contributeur