[BUG] [swift5] Generated Swift oneOfs are not Hashable
Created by: denizdogan
The generated Swift structs are Hashable, but the oneOfs are not Hashable. This causes build errors when a Hashable struct contains non-Hashable oneOfs. Example failing Swift output:
public struct User: Codable, Hashable {
public var gender: GenderOneOf?
}
public enum GenderOneOf: Codable { // <- missing Hashable
// irrelevant
}
openapi-generator version
5.3.1-SNAPSHOT
Related issues/PRs
PR which added Hashable to structs:
https://github.com/OpenAPITools/openapi-generator/pull/9166
Suggest a fix
Just add Hashable to the oneOf templates.