swagger-codegen
swagger-codegen copied to clipboard
[Swift] crash when receiving enum not listed in json schema
Swagger Code Generation: v2.1.5 Language: swift XCode7.2 / Swift 2.0
Given a schema: https://gist.github.com/jaz-ah/f6394360065650000c96
That has an enum: "EnumTest": { "type": "string", "enum": [ "abc", "def" ] } If the service sending the enum sends "xyz", then our current Swift code will crash, even if we declare EnumTest to be an optional property.