openapi-generator/samples
ehyche b716b378c4 Swift4: Add additional initializer for initializing model object with properties. (#6642)
* Add addiitional files from upstream

* Remove mis-added files

* Add additional swift4 initializer for initializing model object with properties.

This change fixes this issue: https://github.com/swagger-api/swagger-codegen/issues/6641

It adds an additional initializer which allows model objects to be initialized using the properties. For exxample, if we had this model:

    "ErrorInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Example Error object"
    },

This we generate an initializer for this model object like this:

    public init(code: Int?, message: String?, details: [String]?) {
        self.code = code
        self.message = message
        self.details = details
    }

* Add hasVars checks around initializers and re-run all scripts to re-generate
2017-10-12 17:35:59 +08:00
..
client Swift4: Add additional initializer for initializing model object with properties. (#6642) 2017-10-12 17:35:59 +08:00
config/petstore/apache2 ApacheConfGen for HTTP Basic Authentication Proposed implementation (#5800) 2017-06-28 02:48:53 +08:00
documentation/cwiki Update samples for several language (just whitespace changes, reordering, VERSION) (#5828) 2017-06-14 01:17:31 +08:00
dynamic-html Update samples for several language (just whitespace changes, reordering, VERSION) (#5828) 2017-06-14 01:17:31 +08:00
html Fix #5653 so body parameter schema link matches model anchor (#5655) 2017-05-18 15:16:42 +08:00
html2 remove ref to SO (#6209) 2017-07-29 18:53:08 +08:00
html.md Update samples for several language (just whitespace changes, reordering, VERSION) (#5828) 2017-06-14 01:17:31 +08:00
server Add Serializable import to JaxRS-spec models if serializableModel is set (#6651) 2017-10-10 22:45:47 +08:00
server-generator Swagger Spec -> OpenAPI Spec 2015-12-30 14:52:15 -08:00
yaml Spelling fixes 2016-08-27 02:34:33 +03:00