arguments to place required parameters before optional parameters. (Default: true) ensureUniqueParams Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true) allowUnicodeIdentifiers boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false) projectName Project name in Xcode responseAs Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available. unwrapRequired Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema podSource Source information used for Podspec podVersion Version used for Podspec podAuthors Authors used for Podspec podSocialMediaURL Social Media URL used for Podspec podDocsetURL Docset URL used for Podspec podLicense License used for Podspec podHomepage Homepage used for Podspec podSummary Summary used for Podspec podDescription Description used for Podspec podScreenshots Screenshots used for Podspec podDocumentationURL Documentation URL used for Podspec swiftUseApiNamespace Flag to make all the API classes inner-class of {{projectName}}API hideGenerationTimestamp hides the timestamp when files were generated (Default: true)
enum Status: String, Codable { case available = "available" case pending = "pending" case sold = "sold" } public var id: Int64? public var category: Category? public var name: String public var photoUrls: [String] public var tags: [Tag]? /** pet status in the store */ public var status: Status? public init(id: Int64?=nil, category: Category?=nil, name: String, photoUrls: [String], tags: [Tag]?=nil, status: Status?=nil) { self.id = id self.category = category self.name = name self.photoUrls = photoUrls self.tags = tags self.status = status } }
by status - parameter status: (query) Status values that need to be considered for filter - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in completion(response?.body, error); } } /** Finds Pets by status - parameter status: (query) Status values that need to be considered for filter - returns: Observable<[Pet]> */ open class func findPetsByStatus(status: [String]) -> Observable<[Pet]> { // responseAs='RxSwift'ͷ߹ return Observable.create { observer -> Disposable in findPetsByStatus(status: status) { data, error in if let error = error { observer.on(.error(error as Error)) } else { observer.on(.next(data!)) } observer.on(.completed) } return Disposables.create() } }