[REQ] [Swift5] Hashable struct models
Created by: maoyama
Is your feature request related to a problem? Please describe.
I'm always frustrated because the generated struct models aren't Hashable. That happens often because DiffableDatasource and SwiftUI.List require a Hashable model. Originally, we just had to define Hashable in the original type declaration of the struct models, but now we have to make the following choices:
- Customize the Template
- Manually add a lot of x-swift-hashable to swagger.yml
- Write a lot of boilerplate code with Extension (because it will be a separate file from the definition)
Describe the solution you'd like
Always make all struct models Hashable like Codable. This doesn't cause any problems and it's a very simple solution. In addition, x-swift-hashable is no longer needed, reducing code. The work of the Swift compiler and the code generated by the Swift compiler will be a lot, but it will be negligible.
Describe alternatives you've considered
Add a flag to additional-properties. If we need a Hashable compliant model, specify it.