forked from loafle/openapi-generator-original
update samples
This commit is contained in:
parent
338812114c
commit
4948ce78ed
@ -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 {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Animal: Codable {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayOfArrayOfNumberOnly: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayOfNumberOnly: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct ArrayTest: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Capitalization: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Cat: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct CatAllOf: Codable {
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Client: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Dog: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct DogAllOf: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct EnumArrays: Codable {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Must be named `File` for test. */
|
||||
public struct File: Codable {
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct FileSchemaTestClass: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct FormatTest: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct HasOnlyReadOnly: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct List: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct MapTest: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing model name starting with number */
|
||||
public struct Model200Response: Codable {
|
||||
|
@ -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 {
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct NumberOnly: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct Order: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct OuterComposite: Codable {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
/** Model for testing reserved words */
|
||||
public struct Return: Codable {
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct SpecialModelName: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct StringBooleanMap: Codable {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct TypeHolderExample: Codable {
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
#if canImport(AnyCodable)
|
||||
import AnyCodable
|
||||
#endif
|
||||
|
||||
public struct User: Codable {
|
||||
|
||||
|
@ -11,5 +11,5 @@ targets:
|
||||
settings:
|
||||
APPLICATION_EXTENSION_API_ONLY: true
|
||||
scheme: {}
|
||||
|
||||
dependencies:
|
||||
- carthage: AnyCodable
|
||||
|
Loading…
x
Reference in New Issue
Block a user