forked from loafle/openapi-generator-original
Add Hashable for Struct (#9166)
* Add hashable for struct * Remove x-swift-hashable * Run the shell script ./bin/generate-samples.sh
This commit is contained in:
parent
29c131e781
commit
c3b7ecff21
@ -1,4 +1,4 @@
|
|||||||
{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct {{classname}}: Codable{{#vendorExtensions.x-swift-hashable}}, Hashable{{/vendorExtensions.x-swift-hashable}} {
|
{{^objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct {{classname}}: Codable, Hashable {
|
||||||
{{/objcCompatible}}{{#objcCompatible}}@objc {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable {
|
{{/objcCompatible}}{{#objcCompatible}}@objc {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class {{classname}}: NSObject, Codable {
|
||||||
{{/objcCompatible}}
|
{{/objcCompatible}}
|
||||||
|
|
||||||
|
@ -1086,7 +1086,6 @@ definitions:
|
|||||||
xml:
|
xml:
|
||||||
name: Order
|
name: Order
|
||||||
Category:
|
Category:
|
||||||
x-swift-hashable: true
|
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct AdditionalPropertiesClass: Codable {
|
public struct AdditionalPropertiesClass: Codable, Hashable {
|
||||||
|
|
||||||
public var mapString: [String: String]?
|
public var mapString: [String: String]?
|
||||||
public var mapMapString: [String: [String: String]]?
|
public var mapMapString: [String: [String: String]]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Animal: Codable {
|
public struct Animal: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ApiResponse: Codable {
|
public struct ApiResponse: Codable, Hashable {
|
||||||
|
|
||||||
public var code: Int?
|
public var code: Int?
|
||||||
public var type: String?
|
public var type: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayOfArrayOfNumberOnly: Codable {
|
public struct ArrayOfArrayOfNumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayArrayNumber: [[Double]]?
|
public var arrayArrayNumber: [[Double]]?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayOfNumberOnly: Codable {
|
public struct ArrayOfNumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayNumber: [Double]?
|
public var arrayNumber: [Double]?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayTest: Codable {
|
public struct ArrayTest: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayOfString: [String]?
|
public var arrayOfString: [String]?
|
||||||
public var arrayArrayOfInteger: [[Int64]]?
|
public var arrayArrayOfInteger: [[Int64]]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Capitalization: Codable {
|
public struct Capitalization: Codable, Hashable {
|
||||||
|
|
||||||
public var smallCamel: String?
|
public var smallCamel: String?
|
||||||
public var capitalCamel: String?
|
public var capitalCamel: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Cat: Codable {
|
public struct Cat: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct CatAllOf: Codable {
|
public struct CatAllOf: Codable, Hashable {
|
||||||
|
|
||||||
public var declawed: Bool?
|
public var declawed: Bool?
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model with \"_class\" property */
|
/** Model for testing model with \"_class\" property */
|
||||||
public struct ClassModel: Codable {
|
public struct ClassModel: Codable, Hashable {
|
||||||
|
|
||||||
public var _class: String?
|
public var _class: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Client: Codable {
|
public struct Client: Codable, Hashable {
|
||||||
|
|
||||||
public var client: String?
|
public var client: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Dog: Codable {
|
public struct Dog: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct DogAllOf: Codable {
|
public struct DogAllOf: Codable, Hashable {
|
||||||
|
|
||||||
public var breed: String?
|
public var breed: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct EnumArrays: Codable {
|
public struct EnumArrays: Codable, Hashable {
|
||||||
|
|
||||||
public enum JustSymbol: String, Codable, CaseIterable {
|
public enum JustSymbol: String, Codable, CaseIterable {
|
||||||
case greaterThanOrEqualTo = ">="
|
case greaterThanOrEqualTo = ">="
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct EnumTest: Codable {
|
public struct EnumTest: Codable, Hashable {
|
||||||
|
|
||||||
public enum EnumString: String, Codable, CaseIterable {
|
public enum EnumString: String, Codable, CaseIterable {
|
||||||
case upper = "UPPER"
|
case upper = "UPPER"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Must be named `File` for test. */
|
/** Must be named `File` for test. */
|
||||||
public struct File: Codable {
|
public struct File: Codable, Hashable {
|
||||||
|
|
||||||
/** Test capitalization */
|
/** Test capitalization */
|
||||||
public var sourceURI: String?
|
public var sourceURI: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct FileSchemaTestClass: Codable {
|
public struct FileSchemaTestClass: Codable, Hashable {
|
||||||
|
|
||||||
public var file: File?
|
public var file: File?
|
||||||
public var files: [File]?
|
public var files: [File]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct FormatTest: Codable {
|
public struct FormatTest: Codable, Hashable {
|
||||||
|
|
||||||
public var integer: Int?
|
public var integer: Int?
|
||||||
public var int32: Int?
|
public var int32: Int?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct HasOnlyReadOnly: Codable {
|
public struct HasOnlyReadOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var bar: String?
|
public var bar: String?
|
||||||
public var foo: String?
|
public var foo: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct List: Codable {
|
public struct List: Codable, Hashable {
|
||||||
|
|
||||||
public var _123list: String?
|
public var _123list: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct MapTest: Codable {
|
public struct MapTest: Codable, Hashable {
|
||||||
|
|
||||||
public enum MapOfEnumString: String, Codable, CaseIterable {
|
public enum MapOfEnumString: String, Codable, CaseIterable {
|
||||||
case upper = "UPPER"
|
case upper = "UPPER"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable {
|
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable {
|
||||||
|
|
||||||
public var uuid: UUID?
|
public var uuid: UUID?
|
||||||
public var dateTime: Date?
|
public var dateTime: Date?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model name starting with number */
|
/** Model for testing model name starting with number */
|
||||||
public struct Model200Response: Codable {
|
public struct Model200Response: Codable, Hashable {
|
||||||
|
|
||||||
public var name: Int?
|
public var name: Int?
|
||||||
public var _class: String?
|
public var _class: String?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model name same as property name */
|
/** Model for testing model name same as property name */
|
||||||
public struct Name: Codable {
|
public struct Name: Codable, Hashable {
|
||||||
|
|
||||||
public var name: Int
|
public var name: Int
|
||||||
public var snakeCase: Int?
|
public var snakeCase: Int?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct NumberOnly: Codable {
|
public struct NumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var justNumber: Double?
|
public var justNumber: Double?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Order: Codable {
|
public struct Order: Codable, Hashable {
|
||||||
|
|
||||||
public enum Status: String, Codable, CaseIterable {
|
public enum Status: String, Codable, CaseIterable {
|
||||||
case placed = "placed"
|
case placed = "placed"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct OuterComposite: Codable {
|
public struct OuterComposite: Codable, Hashable {
|
||||||
|
|
||||||
public var myNumber: Double?
|
public var myNumber: Double?
|
||||||
public var myString: String?
|
public var myString: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ReadOnlyFirst: Codable {
|
public struct ReadOnlyFirst: Codable, Hashable {
|
||||||
|
|
||||||
public var bar: String?
|
public var bar: String?
|
||||||
public var baz: String?
|
public var baz: String?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing reserved words */
|
/** Model for testing reserved words */
|
||||||
public struct Return: Codable {
|
public struct Return: Codable, Hashable {
|
||||||
|
|
||||||
public var _return: Int?
|
public var _return: Int?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct SpecialModelName: Codable {
|
public struct SpecialModelName: Codable, Hashable {
|
||||||
|
|
||||||
public var specialPropertyName: Int64?
|
public var specialPropertyName: Int64?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct StringBooleanMap: Codable {
|
public struct StringBooleanMap: Codable, Hashable {
|
||||||
|
|
||||||
public var additionalProperties: [String: Bool] = [:]
|
public var additionalProperties: [String: Bool] = [:]
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TypeHolderDefault: Codable {
|
public struct TypeHolderDefault: Codable, Hashable {
|
||||||
|
|
||||||
public var stringItem: String = "what"
|
public var stringItem: String = "what"
|
||||||
public var numberItem: Double
|
public var numberItem: Double
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TypeHolderExample: Codable {
|
public struct TypeHolderExample: Codable, Hashable {
|
||||||
|
|
||||||
public var stringItem: String
|
public var stringItem: String
|
||||||
public var numberItem: Double
|
public var numberItem: Double
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct User: Codable {
|
public struct User: Codable, Hashable {
|
||||||
|
|
||||||
public var id: Int64?
|
public var id: Int64?
|
||||||
public var username: String?
|
public var username: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct AdditionalPropertiesClass: Codable {
|
public struct AdditionalPropertiesClass: Codable, Hashable {
|
||||||
|
|
||||||
public var mapString: [String: String]?
|
public var mapString: [String: String]?
|
||||||
public var mapMapString: [String: [String: String]]?
|
public var mapMapString: [String: [String: String]]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Animal: Codable {
|
public struct Animal: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ApiResponse: Codable {
|
public struct ApiResponse: Codable, Hashable {
|
||||||
|
|
||||||
public var code: Int?
|
public var code: Int?
|
||||||
public var type: String?
|
public var type: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayOfArrayOfNumberOnly: Codable {
|
public struct ArrayOfArrayOfNumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayArrayNumber: [[Double]]?
|
public var arrayArrayNumber: [[Double]]?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayOfNumberOnly: Codable {
|
public struct ArrayOfNumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayNumber: [Double]?
|
public var arrayNumber: [Double]?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayTest: Codable {
|
public struct ArrayTest: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayOfString: [String]?
|
public var arrayOfString: [String]?
|
||||||
public var arrayArrayOfInteger: [[Int64]]?
|
public var arrayArrayOfInteger: [[Int64]]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Capitalization: Codable {
|
public struct Capitalization: Codable, Hashable {
|
||||||
|
|
||||||
public var smallCamel: String?
|
public var smallCamel: String?
|
||||||
public var capitalCamel: String?
|
public var capitalCamel: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Cat: Codable {
|
public struct Cat: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct CatAllOf: Codable {
|
public struct CatAllOf: Codable, Hashable {
|
||||||
|
|
||||||
public var declawed: Bool?
|
public var declawed: Bool?
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model with \"_class\" property */
|
/** Model for testing model with \"_class\" property */
|
||||||
public struct ClassModel: Codable {
|
public struct ClassModel: Codable, Hashable {
|
||||||
|
|
||||||
public var _class: String?
|
public var _class: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Client: Codable {
|
public struct Client: Codable, Hashable {
|
||||||
|
|
||||||
public var client: String?
|
public var client: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Dog: Codable {
|
public struct Dog: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct DogAllOf: Codable {
|
public struct DogAllOf: Codable, Hashable {
|
||||||
|
|
||||||
public var breed: String?
|
public var breed: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct EnumArrays: Codable {
|
public struct EnumArrays: Codable, Hashable {
|
||||||
|
|
||||||
public enum JustSymbol: String, Codable, CaseIterable {
|
public enum JustSymbol: String, Codable, CaseIterable {
|
||||||
case greaterThanOrEqualTo = ">="
|
case greaterThanOrEqualTo = ">="
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct EnumTest: Codable {
|
public struct EnumTest: Codable, Hashable {
|
||||||
|
|
||||||
public enum EnumString: String, Codable, CaseIterable {
|
public enum EnumString: String, Codable, CaseIterable {
|
||||||
case upper = "UPPER"
|
case upper = "UPPER"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Must be named `File` for test. */
|
/** Must be named `File` for test. */
|
||||||
public struct File: Codable {
|
public struct File: Codable, Hashable {
|
||||||
|
|
||||||
/** Test capitalization */
|
/** Test capitalization */
|
||||||
public var sourceURI: String?
|
public var sourceURI: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct FileSchemaTestClass: Codable {
|
public struct FileSchemaTestClass: Codable, Hashable {
|
||||||
|
|
||||||
public var file: File?
|
public var file: File?
|
||||||
public var files: [File]?
|
public var files: [File]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct FormatTest: Codable {
|
public struct FormatTest: Codable, Hashable {
|
||||||
|
|
||||||
public var integer: Int?
|
public var integer: Int?
|
||||||
public var int32: Int?
|
public var int32: Int?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct HasOnlyReadOnly: Codable {
|
public struct HasOnlyReadOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var bar: String?
|
public var bar: String?
|
||||||
public var foo: String?
|
public var foo: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct List: Codable {
|
public struct List: Codable, Hashable {
|
||||||
|
|
||||||
public var _123list: String?
|
public var _123list: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct MapTest: Codable {
|
public struct MapTest: Codable, Hashable {
|
||||||
|
|
||||||
public enum MapOfEnumString: String, Codable, CaseIterable {
|
public enum MapOfEnumString: String, Codable, CaseIterable {
|
||||||
case upper = "UPPER"
|
case upper = "UPPER"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable {
|
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable {
|
||||||
|
|
||||||
public var uuid: UUID?
|
public var uuid: UUID?
|
||||||
public var dateTime: Date?
|
public var dateTime: Date?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model name starting with number */
|
/** Model for testing model name starting with number */
|
||||||
public struct Model200Response: Codable {
|
public struct Model200Response: Codable, Hashable {
|
||||||
|
|
||||||
public var name: Int?
|
public var name: Int?
|
||||||
public var _class: String?
|
public var _class: String?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model name same as property name */
|
/** Model for testing model name same as property name */
|
||||||
public struct Name: Codable {
|
public struct Name: Codable, Hashable {
|
||||||
|
|
||||||
public var name: Int
|
public var name: Int
|
||||||
public var snakeCase: Int?
|
public var snakeCase: Int?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct NumberOnly: Codable {
|
public struct NumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var justNumber: Double?
|
public var justNumber: Double?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Order: Codable {
|
public struct Order: Codable, Hashable {
|
||||||
|
|
||||||
public enum Status: String, Codable, CaseIterable {
|
public enum Status: String, Codable, CaseIterable {
|
||||||
case placed = "placed"
|
case placed = "placed"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct OuterComposite: Codable {
|
public struct OuterComposite: Codable, Hashable {
|
||||||
|
|
||||||
public var myNumber: Double?
|
public var myNumber: Double?
|
||||||
public var myString: String?
|
public var myString: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ReadOnlyFirst: Codable {
|
public struct ReadOnlyFirst: Codable, Hashable {
|
||||||
|
|
||||||
public var bar: String?
|
public var bar: String?
|
||||||
public var baz: String?
|
public var baz: String?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing reserved words */
|
/** Model for testing reserved words */
|
||||||
public struct Return: Codable {
|
public struct Return: Codable, Hashable {
|
||||||
|
|
||||||
public var _return: Int?
|
public var _return: Int?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct SpecialModelName: Codable {
|
public struct SpecialModelName: Codable, Hashable {
|
||||||
|
|
||||||
public var specialPropertyName: Int64?
|
public var specialPropertyName: Int64?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct StringBooleanMap: Codable {
|
public struct StringBooleanMap: Codable, Hashable {
|
||||||
|
|
||||||
public var additionalProperties: [String: Bool] = [:]
|
public var additionalProperties: [String: Bool] = [:]
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TypeHolderDefault: Codable {
|
public struct TypeHolderDefault: Codable, Hashable {
|
||||||
|
|
||||||
public var stringItem: String = "what"
|
public var stringItem: String = "what"
|
||||||
public var numberItem: Double
|
public var numberItem: Double
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TypeHolderExample: Codable {
|
public struct TypeHolderExample: Codable, Hashable {
|
||||||
|
|
||||||
public var stringItem: String
|
public var stringItem: String
|
||||||
public var numberItem: Double
|
public var numberItem: Double
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct User: Codable {
|
public struct User: Codable, Hashable {
|
||||||
|
|
||||||
public var id: Int64?
|
public var id: Int64?
|
||||||
public var username: String?
|
public var username: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct AdditionalPropertiesClass: Codable {
|
public struct AdditionalPropertiesClass: Codable, Hashable {
|
||||||
|
|
||||||
public var mapString: [String: String]?
|
public var mapString: [String: String]?
|
||||||
public var mapMapString: [String: [String: String]]?
|
public var mapMapString: [String: [String: String]]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Animal: Codable {
|
public struct Animal: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ApiResponse: Codable {
|
public struct ApiResponse: Codable, Hashable {
|
||||||
|
|
||||||
public var code: Int?
|
public var code: Int?
|
||||||
public var type: String?
|
public var type: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayOfArrayOfNumberOnly: Codable {
|
public struct ArrayOfArrayOfNumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayArrayNumber: [[Double]]?
|
public var arrayArrayNumber: [[Double]]?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayOfNumberOnly: Codable {
|
public struct ArrayOfNumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayNumber: [Double]?
|
public var arrayNumber: [Double]?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ArrayTest: Codable {
|
public struct ArrayTest: Codable, Hashable {
|
||||||
|
|
||||||
public var arrayOfString: [String]?
|
public var arrayOfString: [String]?
|
||||||
public var arrayArrayOfInteger: [[Int64]]?
|
public var arrayArrayOfInteger: [[Int64]]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Capitalization: Codable {
|
public struct Capitalization: Codable, Hashable {
|
||||||
|
|
||||||
public var smallCamel: String?
|
public var smallCamel: String?
|
||||||
public var capitalCamel: String?
|
public var capitalCamel: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Cat: Codable {
|
public struct Cat: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct CatAllOf: Codable {
|
public struct CatAllOf: Codable, Hashable {
|
||||||
|
|
||||||
public var declawed: Bool?
|
public var declawed: Bool?
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model with \"_class\" property */
|
/** Model for testing model with \"_class\" property */
|
||||||
public struct ClassModel: Codable {
|
public struct ClassModel: Codable, Hashable {
|
||||||
|
|
||||||
public var _class: String?
|
public var _class: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Client: Codable {
|
public struct Client: Codable, Hashable {
|
||||||
|
|
||||||
public var client: String?
|
public var client: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Dog: Codable {
|
public struct Dog: Codable, Hashable {
|
||||||
|
|
||||||
public var className: String
|
public var className: String
|
||||||
public var color: String? = "red"
|
public var color: String? = "red"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct DogAllOf: Codable {
|
public struct DogAllOf: Codable, Hashable {
|
||||||
|
|
||||||
public var breed: String?
|
public var breed: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct EnumArrays: Codable {
|
public struct EnumArrays: Codable, Hashable {
|
||||||
|
|
||||||
public enum JustSymbol: String, Codable, CaseIterable {
|
public enum JustSymbol: String, Codable, CaseIterable {
|
||||||
case greaterThanOrEqualTo = ">="
|
case greaterThanOrEqualTo = ">="
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct EnumTest: Codable {
|
public struct EnumTest: Codable, Hashable {
|
||||||
|
|
||||||
public enum EnumString: String, Codable, CaseIterable {
|
public enum EnumString: String, Codable, CaseIterable {
|
||||||
case upper = "UPPER"
|
case upper = "UPPER"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Must be named `File` for test. */
|
/** Must be named `File` for test. */
|
||||||
public struct File: Codable {
|
public struct File: Codable, Hashable {
|
||||||
|
|
||||||
/** Test capitalization */
|
/** Test capitalization */
|
||||||
public var sourceURI: String?
|
public var sourceURI: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct FileSchemaTestClass: Codable {
|
public struct FileSchemaTestClass: Codable, Hashable {
|
||||||
|
|
||||||
public var file: File?
|
public var file: File?
|
||||||
public var files: [File]?
|
public var files: [File]?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct FormatTest: Codable {
|
public struct FormatTest: Codable, Hashable {
|
||||||
|
|
||||||
public var integer: Int?
|
public var integer: Int?
|
||||||
public var int32: Int?
|
public var int32: Int?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct HasOnlyReadOnly: Codable {
|
public struct HasOnlyReadOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var bar: String?
|
public var bar: String?
|
||||||
public var foo: String?
|
public var foo: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct List: Codable {
|
public struct List: Codable, Hashable {
|
||||||
|
|
||||||
public var _123list: String?
|
public var _123list: String?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct MapTest: Codable {
|
public struct MapTest: Codable, Hashable {
|
||||||
|
|
||||||
public enum MapOfEnumString: String, Codable, CaseIterable {
|
public enum MapOfEnumString: String, Codable, CaseIterable {
|
||||||
case upper = "UPPER"
|
case upper = "UPPER"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable {
|
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable {
|
||||||
|
|
||||||
public var uuid: UUID?
|
public var uuid: UUID?
|
||||||
public var dateTime: Date?
|
public var dateTime: Date?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model name starting with number */
|
/** Model for testing model name starting with number */
|
||||||
public struct Model200Response: Codable {
|
public struct Model200Response: Codable, Hashable {
|
||||||
|
|
||||||
public var name: Int?
|
public var name: Int?
|
||||||
public var _class: String?
|
public var _class: String?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing model name same as property name */
|
/** Model for testing model name same as property name */
|
||||||
public struct Name: Codable {
|
public struct Name: Codable, Hashable {
|
||||||
|
|
||||||
public var name: Int
|
public var name: Int
|
||||||
public var snakeCase: Int?
|
public var snakeCase: Int?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct NumberOnly: Codable {
|
public struct NumberOnly: Codable, Hashable {
|
||||||
|
|
||||||
public var justNumber: Double?
|
public var justNumber: Double?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct Order: Codable {
|
public struct Order: Codable, Hashable {
|
||||||
|
|
||||||
public enum Status: String, Codable, CaseIterable {
|
public enum Status: String, Codable, CaseIterable {
|
||||||
case placed = "placed"
|
case placed = "placed"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct OuterComposite: Codable {
|
public struct OuterComposite: Codable, Hashable {
|
||||||
|
|
||||||
public var myNumber: Double?
|
public var myNumber: Double?
|
||||||
public var myString: String?
|
public var myString: String?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct ReadOnlyFirst: Codable {
|
public struct ReadOnlyFirst: Codable, Hashable {
|
||||||
|
|
||||||
public var bar: String?
|
public var bar: String?
|
||||||
public var baz: String?
|
public var baz: String?
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/** Model for testing reserved words */
|
/** Model for testing reserved words */
|
||||||
public struct Return: Codable {
|
public struct Return: Codable, Hashable {
|
||||||
|
|
||||||
public var _return: Int?
|
public var _return: Int?
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct SpecialModelName: Codable {
|
public struct SpecialModelName: Codable, Hashable {
|
||||||
|
|
||||||
public var specialPropertyName: Int64?
|
public var specialPropertyName: Int64?
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user