forked from loafle/openapi-generator-original
[swift5][client] make AnyCodable optional (#9479)
* [swift5][client] make AnyCodable usage optional * [swift5][client] update sample projects
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import AnyCodable{{#usePromiseKit}}
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif{{#usePromiseKit}}
|
||||
import PromiseKit{{/usePromiseKit}}
|
||||
|
||||
extension Bool: JSONEncodable {
|
||||
@@ -201,6 +203,7 @@ extension RequestBuilder {
|
||||
}
|
||||
}{{/usePromiseKit}}
|
||||
|
||||
#if canImport(AnyCodable)
|
||||
extension AnyCodable: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch value {
|
||||
@@ -240,4 +243,5 @@ extension AnyCodable: Hashable {
|
||||
hasher.combine(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -11,8 +11,8 @@ targets:
|
||||
settings:
|
||||
APPLICATION_EXTENSION_API_ONLY: true
|
||||
scheme: {}
|
||||
{{#useAlamofire}}dependencies:{{/useAlamofire}}{{^useAlamofire}}{{#useRxSwift}}dependencies:{{/useRxSwift}}{{/useAlamofire}}{{^useAlamofire}}{{^useRxSwift}}{{#usePromiseKit}}dependencies:{{/usePromiseKit}}{{/useRxSwift}}{{/useAlamofire}}{{#useAlamofire}}
|
||||
dependencies:
|
||||
- carthage: AnyCodable{{#useAlamofire}}
|
||||
- carthage: Alamofire{{/useAlamofire}}{{#useRxSwift}}
|
||||
- carthage: RxSwift{{/useRxSwift}}{{#usePromiseKit}}
|
||||
- carthage: PromiseKit{{/usePromiseKit}}
|
||||
- carthage: AnyCodable
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
{{#description}}
|
||||
|
||||
/** {{description}} */{{/description}}{{#isDeprecated}}
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
extension Bool: JSONEncodable {
|
||||
func encodeToJSON() -> Any { return self as Any }
|
||||
@@ -185,6 +187,7 @@ extension HTTPURLResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#if canImport(AnyCodable)
|
||||
extension AnyCodable: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch value {
|
||||
@@ -224,4 +227,5 @@ extension AnyCodable: Hashable {
|
||||
hasher.combine(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesClass: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Animal: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public typealias AnimalFarm = [Animal]
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ApiResponse: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayOfArrayOfNumberOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayOfNumberOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Capitalization: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Cat: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct CatAllOf: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Category: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing model with \"_class\" property */
|
||||
public struct ClassModel: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Client: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Dog: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct DogAllOf: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct EnumArrays: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public enum EnumClass: String, Codable, CaseIterable {
|
||||
case abc = "_abc"
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct EnumTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Must be named `File` for test. */
|
||||
public struct File: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct FileSchemaTestClass: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct FormatTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct HasOnlyReadOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct List: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct MapTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing model name starting with number */
|
||||
public struct Model200Response: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing model name same as property name */
|
||||
public struct Name: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct NumberOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Order: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct OuterComposite: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public enum OuterEnum: String, Codable, CaseIterable {
|
||||
case placed = "placed"
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Pet: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ReadOnlyFirst: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing reserved words */
|
||||
public struct Return: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct SpecialModelName: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct StringBooleanMap: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Tag: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct TypeHolderDefault: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct TypeHolderExample: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct User: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -12,5 +12,5 @@ targets:
|
||||
APPLICATION_EXTENSION_API_ONLY: true
|
||||
scheme: {}
|
||||
dependencies:
|
||||
- carthage: Alamofire
|
||||
- carthage: AnyCodable
|
||||
- carthage: Alamofire
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
extension Bool: JSONEncodable {
|
||||
func encodeToJSON() -> Any { return self as Any }
|
||||
@@ -185,6 +187,7 @@ extension HTTPURLResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#if canImport(AnyCodable)
|
||||
extension AnyCodable: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch value {
|
||||
@@ -224,4 +227,5 @@ extension AnyCodable: Hashable {
|
||||
hasher.combine(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesClass: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Animal: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public typealias AnimalFarm = [Animal]
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ApiResponse: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayOfArrayOfNumberOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayOfNumberOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Capitalization: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Cat: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct CatAllOf: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Category: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing model with \"_class\" property */
|
||||
public struct ClassModel: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Client: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Dog: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct DogAllOf: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct EnumArrays: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public enum EnumClass: String, Codable, CaseIterable {
|
||||
case abc = "_abc"
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct EnumTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Must be named `File` for test. */
|
||||
public struct File: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct FileSchemaTestClass: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct FormatTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct HasOnlyReadOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct List: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct MapTest: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing model name starting with number */
|
||||
public struct Model200Response: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing model name same as property name */
|
||||
public struct Name: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct NumberOnly: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Order: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct OuterComposite: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public enum OuterEnum: String, Codable, CaseIterable {
|
||||
case placed = "placed"
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Pet: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ReadOnlyFirst: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing reserved words */
|
||||
public struct Return: Codable, Hashable {
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct SpecialModelName: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct StringBooleanMap: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Tag: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct TypeHolderDefault: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct TypeHolderExample: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct User: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -11,5 +11,5 @@ targets:
|
||||
settings:
|
||||
APPLICATION_EXTENSION_API_ONLY: true
|
||||
scheme: {}
|
||||
|
||||
dependencies:
|
||||
- carthage: AnyCodable
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
extension Bool: JSONEncodable {
|
||||
func encodeToJSON() -> Any { return self as Any }
|
||||
@@ -185,6 +187,7 @@ extension HTTPURLResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#if canImport(AnyCodable)
|
||||
extension AnyCodable: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch value {
|
||||
@@ -224,4 +227,5 @@ extension AnyCodable: Hashable {
|
||||
hasher.combine(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesAnyType: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesArray: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesBoolean: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesClass: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesInteger: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesNumber: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesObject: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct AdditionalPropertiesString: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Animal: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public typealias AnimalFarm = [Animal]
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ApiResponse: Codable, Hashable {
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayOfArrayOfNumberOnly: Codable, Hashable {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user