mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
Swift3 xcodewarnings (#6298)
* added headers to makeRequest function for swift3 template * Swift3 update to dismiss Xcode warnings
This commit is contained in:
parent
71123e157e
commit
da4fe86402
@ -58,7 +58,7 @@ open class RequestBuilder<T> {
|
||||
|
||||
open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: ErrorResponse?) -> Void) { }
|
||||
|
||||
public func addHeader(name: String, value: String) -> Self {
|
||||
@discardableResult public func addHeader(name: String, value: String) -> Self {
|
||||
if !value.isEmpty {
|
||||
headers[name] = value
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ class Decoders {
|
||||
}
|
||||
}
|
||||
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject where T.RawValue == U>(clazz: T, source: AnyObject) -> Decoded<T?> {
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject>(clazz: T, source: AnyObject) -> Decoded<T?> where T.RawValue == U {
|
||||
if let value = source as? U {
|
||||
if let enumValue = T.init(rawValue: value) {
|
||||
return .success(enumValue)
|
||||
|
@ -58,7 +58,7 @@ open class RequestBuilder<T> {
|
||||
|
||||
open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: ErrorResponse?) -> Void) { }
|
||||
|
||||
public func addHeader(name: String, value: String) -> Self {
|
||||
@discardableResult public func addHeader(name: String, value: String) -> Self {
|
||||
if !value.isEmpty {
|
||||
headers[name] = value
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ class Decoders {
|
||||
}
|
||||
}
|
||||
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject where T.RawValue == U>(clazz: T, source: AnyObject) -> Decoded<T?> {
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject>(clazz: T, source: AnyObject) -> Decoded<T?> where T.RawValue == U {
|
||||
if let value = source as? U {
|
||||
if let enumValue = T.init(rawValue: value) {
|
||||
return .success(enumValue)
|
||||
|
@ -58,7 +58,7 @@ open class RequestBuilder<T> {
|
||||
|
||||
open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: ErrorResponse?) -> Void) { }
|
||||
|
||||
public func addHeader(name: String, value: String) -> Self {
|
||||
@discardableResult public func addHeader(name: String, value: String) -> Self {
|
||||
if !value.isEmpty {
|
||||
headers[name] = value
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ class Decoders {
|
||||
}
|
||||
}
|
||||
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject where T.RawValue == U>(clazz: T, source: AnyObject) -> Decoded<T?> {
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject>(clazz: T, source: AnyObject) -> Decoded<T?> where T.RawValue == U {
|
||||
if let value = source as? U {
|
||||
if let enumValue = T.init(rawValue: value) {
|
||||
return .success(enumValue)
|
||||
@ -824,7 +824,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterBoolean
|
||||
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
||||
if let source = source as? Bool {
|
||||
if let source = source as? OuterBoolean {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
||||
@ -864,7 +864,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterNumber
|
||||
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
||||
if let source = source as? Double {
|
||||
if let source = source as? OuterNumber {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
||||
@ -872,7 +872,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterString
|
||||
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
||||
if let source = source as? String {
|
||||
if let source = source as? OuterString {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
||||
|
@ -25,3 +25,4 @@ open class AdditionalPropertiesClass: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Animal: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class ApiResponse: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class ArrayOfArrayOfNumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class ArrayOfNumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class ArrayTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,3 +34,4 @@ open class Capitalization: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class Cat: Animal {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Category: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,3 +24,4 @@ open class ClassModel: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class Client: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class Dog: Animal {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,3 +33,4 @@ open class EnumArrays: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,3 +42,4 @@ open class EnumTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,3 +47,4 @@ open class FormatTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class HasOnlyReadOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class List: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,3 +28,4 @@ open class MapTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class MixedPropertiesAndAdditionalPropertiesClass: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,3 +26,4 @@ open class Model200Response: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,3 +30,4 @@ open class Name: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class NumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,3 +39,4 @@ open class Order: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,17 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias OuterBoolean = Bool
|
||||
open class OuterBoolean: JSONEncodable {
|
||||
|
||||
|
||||
public init() {}
|
||||
|
||||
// MARK: JSONEncodable
|
||||
open func encodeToJSON() -> Any {
|
||||
var nillableDictionary = [String:Any?]()
|
||||
|
||||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class OuterComposite: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,17 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias OuterNumber = Double
|
||||
open class OuterNumber: JSONEncodable {
|
||||
|
||||
|
||||
public init() {}
|
||||
|
||||
// MARK: JSONEncodable
|
||||
open func encodeToJSON() -> Any {
|
||||
var nillableDictionary = [String:Any?]()
|
||||
|
||||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,17 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias OuterString = String
|
||||
open class OuterString: JSONEncodable {
|
||||
|
||||
|
||||
public init() {}
|
||||
|
||||
// MARK: JSONEncodable
|
||||
open func encodeToJSON() -> Any {
|
||||
var nillableDictionary = [String:Any?]()
|
||||
|
||||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,3 +39,4 @@ open class Pet: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class ReadOnlyFirst: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,3 +24,4 @@ open class Return: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class SpecialModelName: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Tag: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,3 +38,4 @@ open class User: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ open class RequestBuilder<T> {
|
||||
|
||||
open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: ErrorResponse?) -> Void) { }
|
||||
|
||||
public func addHeader(name: String, value: String) -> Self {
|
||||
@discardableResult public func addHeader(name: String, value: String) -> Self {
|
||||
if !value.isEmpty {
|
||||
headers[name] = value
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ class Decoders {
|
||||
}
|
||||
}
|
||||
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject where T.RawValue == U>(clazz: T, source: AnyObject) -> Decoded<T?> {
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject>(clazz: T, source: AnyObject) -> Decoded<T?> where T.RawValue == U {
|
||||
if let value = source as? U {
|
||||
if let enumValue = T.init(rawValue: value) {
|
||||
return .success(enumValue)
|
||||
@ -824,7 +824,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterBoolean
|
||||
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
||||
if let source = source as? Bool {
|
||||
if let source = source as? OuterBoolean {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
||||
@ -864,7 +864,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterNumber
|
||||
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
||||
if let source = source as? Double {
|
||||
if let source = source as? OuterNumber {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
||||
@ -872,7 +872,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterString
|
||||
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
||||
if let source = source as? String {
|
||||
if let source = source as? OuterString {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
||||
|
@ -25,3 +25,4 @@ open class AdditionalPropertiesClass: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Animal: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class ApiResponse: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class ArrayOfArrayOfNumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class ArrayOfNumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class ArrayTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,3 +34,4 @@ open class Capitalization: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class Cat: Animal {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Category: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,3 +24,4 @@ open class ClassModel: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class Client: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class Dog: Animal {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,3 +33,4 @@ open class EnumArrays: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,3 +42,4 @@ open class EnumTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,3 +47,4 @@ open class FormatTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class HasOnlyReadOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class List: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,3 +28,4 @@ open class MapTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class MixedPropertiesAndAdditionalPropertiesClass: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,3 +26,4 @@ open class Model200Response: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,3 +30,4 @@ open class Name: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class NumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,3 +39,4 @@ open class Order: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,17 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias OuterBoolean = Bool
|
||||
open class OuterBoolean: JSONEncodable {
|
||||
|
||||
|
||||
public init() {}
|
||||
|
||||
// MARK: JSONEncodable
|
||||
open func encodeToJSON() -> Any {
|
||||
var nillableDictionary = [String:Any?]()
|
||||
|
||||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,4 @@ open class OuterComposite: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,17 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias OuterNumber = Double
|
||||
open class OuterNumber: JSONEncodable {
|
||||
|
||||
|
||||
public init() {}
|
||||
|
||||
// MARK: JSONEncodable
|
||||
open func encodeToJSON() -> Any {
|
||||
var nillableDictionary = [String:Any?]()
|
||||
|
||||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,17 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias OuterString = String
|
||||
open class OuterString: JSONEncodable {
|
||||
|
||||
|
||||
public init() {}
|
||||
|
||||
// MARK: JSONEncodable
|
||||
open func encodeToJSON() -> Any {
|
||||
var nillableDictionary = [String:Any?]()
|
||||
|
||||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,3 +39,4 @@ open class Pet: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class ReadOnlyFirst: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,3 +24,4 @@ open class Return: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,4 @@ open class SpecialModelName: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Tag: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,3 +38,4 @@ open class User: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ open class RequestBuilder<T> {
|
||||
|
||||
open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: ErrorResponse?) -> Void) { }
|
||||
|
||||
public func addHeader(name: String, value: String) -> Self {
|
||||
@discardableResult public func addHeader(name: String, value: String) -> Self {
|
||||
if !value.isEmpty {
|
||||
headers[name] = value
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ class Decoders {
|
||||
}
|
||||
}
|
||||
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject where T.RawValue == U>(clazz: T, source: AnyObject) -> Decoded<T?> {
|
||||
static func decodeOptional<T: RawRepresentable, U: AnyObject>(clazz: T, source: AnyObject) -> Decoded<T?> where T.RawValue == U {
|
||||
if let value = source as? U {
|
||||
if let enumValue = T.init(rawValue: value) {
|
||||
return .success(enumValue)
|
||||
@ -712,7 +712,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterBoolean
|
||||
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
||||
if let source = source as? Bool {
|
||||
if let source = source as? OuterBoolean {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
||||
@ -746,7 +746,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterNumber
|
||||
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
||||
if let source = source as? Double {
|
||||
if let source = source as? OuterNumber {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
||||
@ -754,7 +754,7 @@ class Decoders {
|
||||
}
|
||||
// Decoder for OuterString
|
||||
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
||||
if let source = source as? String {
|
||||
if let source = source as? OuterString {
|
||||
return .success(source)
|
||||
} else {
|
||||
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
||||
|
@ -28,3 +28,4 @@ open class AdditionalPropertiesClass: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,3 +28,4 @@ open class Animal: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,3 +31,4 @@ open class ApiResponse: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class ArrayOfArrayOfNumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class ArrayOfNumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,3 +31,4 @@ open class ArrayTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,3 +41,4 @@ open class Capitalization: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Cat: Animal {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,3 +28,4 @@ open class Category: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,3 +26,4 @@ open class ClassModel: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Client: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class Dog: Animal {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,3 +36,4 @@ open class EnumArrays: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,3 +47,4 @@ open class EnumTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,3 +61,4 @@ open class FormatTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,3 +28,4 @@ open class HasOnlyReadOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class List: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,3 +31,4 @@ open class MapTest: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,3 +31,4 @@ open class MixedPropertiesAndAdditionalPropertiesClass: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,3 +29,4 @@ open class Model200Response: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,3 +35,4 @@ open class Name: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,4 @@ open class NumberOnly: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,3 +46,4 @@ open class Order: JSONEncodable {
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,18 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias OuterBoolean = Bool
|
||||
open class OuterBoolean: JSONEncodable {
|
||||
|
||||
|
||||
|
||||
public init() {
|
||||
}
|
||||
// MARK: JSONEncodable
|
||||
open func encodeToJSON() -> Any {
|
||||
var nillableDictionary = [String:Any?]()
|
||||
|
||||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||
return dictionary
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user