forked from loafle/openapi-generator-original
update samples
This commit is contained in:
parent
33107c14de
commit
05aa956fe1
@ -321,7 +321,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -355,7 +355,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -373,7 +373,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -431,7 +431,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -453,7 +453,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public var double: Double?
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -428,7 +428,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -361,7 +361,7 @@ open class FakeAPI {
|
||||
*/
|
||||
#if canImport(Combine)
|
||||
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<Void, Error> {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<Void, Error> {
|
||||
return Future<Void, Error>.init { promise in
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -398,7 +398,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -413,7 +413,7 @@ open class PetAPI {
|
||||
*/
|
||||
#if canImport(Combine)
|
||||
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<ApiResponse, Error> {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<ApiResponse, Error> {
|
||||
return Future<ApiResponse, Error>.init { promise in
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -438,7 +438,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -476,7 +476,7 @@ open class PetAPI {
|
||||
*/
|
||||
#if canImport(Combine)
|
||||
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<ApiResponse, Error> {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<ApiResponse, Error> {
|
||||
return Future<ApiResponse, Error>.init { promise in
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -501,7 +501,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public var double: Double?
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -428,7 +428,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -321,7 +321,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -355,7 +355,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -373,7 +373,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -431,7 +431,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -453,7 +453,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public var double: Double?
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -428,7 +428,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -373,7 +373,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -364,7 +364,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -376,7 +376,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -397,7 +397,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -321,7 +321,7 @@ internal class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -355,7 +355,7 @@ internal class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
internal class func testEndpointParametersWithRequestBuilder(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
internal class func testEndpointParametersWithRequestBuilder(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -373,7 +373,7 @@ internal class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ internal class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
internal class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
internal class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -431,7 +431,7 @@ internal class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: Data, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -453,7 +453,7 @@ internal class PetAPI {
|
||||
- parameter requiredFile: (form) file to upload
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
internal class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, requiredFile: Data) -> RequestBuilder<ApiResponse> {
|
||||
internal class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ internal struct FormatTest: Codable, Hashable {
|
||||
internal var double: Double?
|
||||
internal var string: String?
|
||||
internal var byte: Data
|
||||
internal var binary: Data?
|
||||
internal var binary: URL?
|
||||
internal var date: Date
|
||||
internal var dateTime: Date?
|
||||
internal var uuid: UUID?
|
||||
internal var password: String
|
||||
|
||||
internal init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
internal init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let double = 987 // Double | None
|
||||
let string = "string_example" // String | None (optional)
|
||||
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
|
||||
let byte = 987 // Data | None
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**string** | **String** | None | [optional]
|
||||
**patternWithoutDelimiter** | **String** | None |
|
||||
**byte** | **Data** | None |
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: Data, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -429,7 +429,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
|
||||
// uploads an image (required)
|
||||
PetAPI.uploadFileWithRequiredFile(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile) { (response, error) in
|
||||
@ -450,7 +450,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -321,7 +321,7 @@ import Foundation
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -355,7 +355,7 @@ import Foundation
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -373,7 +373,7 @@ import Foundation
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ import Foundation
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -431,7 +431,7 @@ import Foundation
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -453,7 +453,7 @@ import Foundation
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -42,13 +42,13 @@ import Foundation
|
||||
}
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -428,7 +428,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -336,7 +336,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Promise<Void>
|
||||
*/
|
||||
open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
|
||||
open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<Void> {
|
||||
let deferred = Promise<Void>.pending()
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -372,7 +372,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -388,7 +388,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Promise<ApiResponse>
|
||||
*/
|
||||
open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
|
||||
open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
|
||||
let deferred = Promise<ApiResponse>.pending()
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -412,7 +412,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -448,7 +448,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Promise<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<ApiResponse> {
|
||||
let deferred = Promise<ApiResponse>.pending()
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -472,7 +472,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public var double: Double?
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -343,7 +343,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise<Void>
|
||||
open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise<Void>
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -364,7 +364,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -393,7 +393,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -344,7 +344,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> Promise<ApiResponse>
|
||||
open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise<ApiResponse>
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -356,7 +356,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file).then {
|
||||
@ -374,7 +374,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -393,7 +393,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> Promise<ApiResponse>
|
||||
open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise<ApiResponse>
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -404,7 +404,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -422,7 +422,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -321,7 +321,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -355,7 +355,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -373,7 +373,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -431,7 +431,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -453,7 +453,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public private(set) var double: Double?
|
||||
public private(set) var string: String?
|
||||
public private(set) var byte: Data
|
||||
public private(set) var binary: Data?
|
||||
public private(set) var binary: URL?
|
||||
public private(set) var date: Date
|
||||
public private(set) var dateTime: Date?
|
||||
public private(set) var uuid: UUID?
|
||||
public private(set) var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -428,7 +428,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -321,7 +321,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the result
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<Void, Error>) -> Void)) {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<Void, Error>) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -355,7 +355,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -373,7 +373,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the result
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<ApiResponse, Error>) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<ApiResponse, Error>) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -431,7 +431,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the result
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<ApiResponse, Error>) -> Void)) {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<ApiResponse, Error>) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -453,7 +453,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public var double: Double?
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -428,7 +428,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -350,7 +350,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Observable<Void>
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<Void> {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<Void> {
|
||||
return Observable.create { observer -> Disposable in
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -388,7 +388,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -402,7 +402,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Observable<ApiResponse>
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<ApiResponse> {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<ApiResponse> {
|
||||
return Observable.create { observer -> Disposable in
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -428,7 +428,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -464,7 +464,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- returns: Observable<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<ApiResponse> {
|
||||
return Observable.create { observer -> Disposable in
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
@ -490,7 +490,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public var double: Double?
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -300,7 +300,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable<Void>
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable<Void>
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -321,7 +321,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -343,7 +343,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -295,7 +295,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> Observable<ApiResponse>
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Observable<ApiResponse>
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -307,7 +307,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new
|
||||
```
|
||||
@ -318,7 +318,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -337,7 +337,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> Observable<ApiResponse>
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Observable<ApiResponse>
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -348,7 +348,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new
|
||||
@ -359,7 +359,7 @@ let additionalMetadata = "additionalMetadata_example" // String | Additional dat
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -321,7 +321,7 @@ open class FakeAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -355,7 +355,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String: Any?] = [
|
||||
|
@ -373,7 +373,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -395,7 +395,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/pet/{petId}/uploadImage"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
@ -431,7 +431,7 @@ open class PetAPI {
|
||||
- parameter apiResponseQueue: The queue on which api response is dispatched.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in
|
||||
switch result {
|
||||
case let .success(response):
|
||||
@ -453,7 +453,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- returns: RequestBuilder<ApiResponse>
|
||||
*/
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder<ApiResponse> {
|
||||
var path = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))"
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
|
@ -17,13 +17,13 @@ public struct FormatTest: Codable, Hashable {
|
||||
public var double: Double?
|
||||
public var string: String?
|
||||
public var byte: Data
|
||||
public var binary: Data?
|
||||
public var binary: URL?
|
||||
public var date: Date
|
||||
public var dateTime: Date?
|
||||
public var uuid: UUID?
|
||||
public var password: String
|
||||
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: Data? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) {
|
||||
self.integer = integer
|
||||
self.int32 = int32
|
||||
self.int64 = int64
|
||||
|
@ -364,7 +364,7 @@ No authorization required
|
||||
|
||||
# **testEndpointParameters**
|
||||
```swift
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -385,7 +385,7 @@ let int32 = 987 // Int | None (optional)
|
||||
let int64 = 987 // Int64 | None (optional)
|
||||
let float = 987 // Float | None (optional)
|
||||
let string = "string_example" // String | None (optional)
|
||||
let binary = 987 // Data | None (optional)
|
||||
let binary = URL(string: "https://example.com")! // URL | None (optional)
|
||||
let date = Date() // Date | None (optional)
|
||||
let dateTime = Date() // Date | None (optional)
|
||||
let password = "password_example" // String | None (optional)
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **Int64** | None | [optional]
|
||||
**float** | **Float** | None | [optional]
|
||||
**string** | **String** | None | [optional]
|
||||
**binary** | **Data** | None | [optional]
|
||||
**binary** | **URL** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
|
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**double** | **Double** | | [optional]
|
||||
**string** | **String** | | [optional]
|
||||
**byte** | **Data** | |
|
||||
**binary** | **Data** | | [optional]
|
||||
**binary** | **URL** | | [optional]
|
||||
**date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **UUID** | | [optional]
|
||||
|
@ -365,7 +365,7 @@ Void (empty response body)
|
||||
|
||||
# **uploadFile**
|
||||
```swift
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image
|
||||
@ -377,7 +377,7 @@ import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
let file = 987 // Data | file to upload (optional)
|
||||
let file = URL(string: "https://example.com")! // URL | file to upload (optional)
|
||||
|
||||
// uploads an image
|
||||
PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in
|
||||
@ -398,7 +398,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **Data** | file to upload | [optional]
|
||||
**file** | **URL** | file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -417,7 +417,7 @@ Name | Type | Description | Notes
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
```swift
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void)
|
||||
```
|
||||
|
||||
uploads an image (required)
|
||||
@ -428,7 +428,7 @@ uploads an image (required)
|
||||
import PetstoreClient
|
||||
|
||||
let petId = 987 // Int64 | ID of pet to update
|
||||
let requiredFile = 987 // Data | file to upload
|
||||
let requiredFile = URL(string: "https://example.com")! // URL | file to upload
|
||||
let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional)
|
||||
|
||||
// uploads an image (required)
|
||||
@ -449,7 +449,7 @@ PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, addi
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Int64** | ID of pet to update |
|
||||
**requiredFile** | **Data** | file to upload |
|
||||
**requiredFile** | **URL** | file to upload |
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
Loading…
x
Reference in New Issue
Block a user