forked from loafle/openapi-generator-original
Merge branch 'swfit_code_format' into 2.3.0
This commit is contained in:
commit
4bbd9b29a2
@ -263,9 +263,11 @@ class Decoders {
|
|||||||
} else {
|
} else {
|
||||||
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
} {{#models}}{{#model}}
|
}
|
||||||
|
|
||||||
{{^isArrayModel}}
|
{{#models}}
|
||||||
|
{{#model}}
|
||||||
|
{{^isArrayModel}}
|
||||||
// Decoder for {{{classname}}}
|
// Decoder for {{{classname}}}
|
||||||
Decoders.addDecoder(clazz: {{{classname}}}.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<{{{classname}}}> in
|
Decoders.addDecoder(clazz: {{{classname}}}.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<{{{classname}}}> in
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
@ -302,12 +304,12 @@ class Decoders {
|
|||||||
}
|
}
|
||||||
{{/requiredVars}}
|
{{/requiredVars}}
|
||||||
let result = {{classname}}({{#requiredVars}}{{^-first}}, {{/-first}}{{name}}: {{name}}{{/requiredVars}})
|
let result = {{classname}}({{#requiredVars}}{{^-first}}, {{/-first}}{{name}}: {{name}}{{/requiredVars}})
|
||||||
{{#optionalVars}}
|
{{#optionalVars}}
|
||||||
switch Decoders.decodeOptional(clazz: {{#isEnum}}{{^isListContainer}}{{classname}}.{{enumName}}.self{{/isListContainer}}{{#isListContainer}}Array<{{classname}}.{{enumName}}>.self{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{datatype}}}.self{{/isEnum}}, source: sourceDictionary["{{baseName}}"] as AnyObject?) {
|
switch Decoders.decodeOptional(clazz: {{#isEnum}}{{^isListContainer}}{{classname}}.{{enumName}}.self{{/isListContainer}}{{#isListContainer}}Array<{{classname}}.{{enumName}}>.self{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{datatype}}}.self{{/isEnum}}, source: sourceDictionary["{{baseName}}"] as AnyObject?) {
|
||||||
case let .success(value): instance.{{name}} = value
|
case let .success(value): instance.{{name}} = value
|
||||||
case let .failure(error): return .failure(error)
|
case let .failure(error): return .failure(error)
|
||||||
}
|
}
|
||||||
{{/optionalVars}}
|
{{/optionalVars}}
|
||||||
{{/unwrapRequired}}
|
{{/unwrapRequired}}
|
||||||
{{^unwrapRequired}}
|
{{^unwrapRequired}}
|
||||||
let result = instance == nil ? {{classname}}() : instance as! {{classname}}
|
let result = instance == nil ? {{classname}}() : instance as! {{classname}}
|
||||||
@ -323,7 +325,7 @@ class Decoders {
|
|||||||
case let .failure(error): return .failure(error)
|
case let .failure(error): return .failure(error)
|
||||||
{{#isEnum}}{{#isMapContainer}}*/ default: break //TODO: handle enum map scenario{{/isMapContainer}}{{/isEnum}}
|
{{#isEnum}}{{#isMapContainer}}*/ default: break //TODO: handle enum map scenario{{/isMapContainer}}{{/isEnum}}
|
||||||
}
|
}
|
||||||
{{/allVars}}
|
{{/allVars}}
|
||||||
{{/unwrapRequired}}
|
{{/unwrapRequired}}
|
||||||
{{#additionalPropertiesType}}
|
{{#additionalPropertiesType}}
|
||||||
|
|
||||||
@ -343,7 +345,9 @@ class Decoders {
|
|||||||
}
|
}
|
||||||
{{/allVars.isEmpty}}
|
{{/allVars.isEmpty}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
}{{/isArrayModel}}{{/model}}
|
}
|
||||||
|
{{/isArrayModel}}
|
||||||
|
{{/model}}
|
||||||
{{/models}}
|
{{/models}}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ extension {{projectName}}API {
|
|||||||
{{/swiftUseApiNamespace}}
|
{{/swiftUseApiNamespace}}
|
||||||
|
|
||||||
{{#description}}
|
{{#description}}
|
||||||
/** {{description}} */{{/description}}
|
/** {{description}} */
|
||||||
|
{{/description}}
|
||||||
open class {{classname}}: APIBase {
|
open class {{classname}}: APIBase {
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
{{#allParams}}
|
{{#allParams}}
|
||||||
@ -32,8 +33,10 @@ open class {{classname}}: APIBase {
|
|||||||
/**
|
/**
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
{{{summary}}}
|
{{{summary}}}
|
||||||
{{/summary}}{{#allParams}}
|
{{/summary}}
|
||||||
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
{{#allParams}}
|
||||||
|
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
|
{{/allParams}}
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ {{#returnType}}data: {{{returnType}}}?, _ {{/returnType}}error: ErrorResponse?) -> Void)) {
|
open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ {{#returnType}}data: {{{returnType}}}?, _ {{/returnType}}error: ErrorResponse?) -> Void)) {
|
||||||
@ -46,8 +49,10 @@ open class {{classname}}: APIBase {
|
|||||||
/**
|
/**
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
{{{summary}}}
|
{{{summary}}}
|
||||||
{{/summary}}{{#allParams}}
|
{{/summary}}
|
||||||
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
{{#allParams}}
|
||||||
|
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
|
{{/allParams}}
|
||||||
- returns: Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
- returns: Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
||||||
*/
|
*/
|
||||||
open class func {{operationId}}({{#allParams}} {{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
open class func {{operationId}}({{#allParams}} {{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
||||||
@ -66,8 +71,10 @@ open class {{classname}}: APIBase {
|
|||||||
/**
|
/**
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
{{{summary}}}
|
{{{summary}}}
|
||||||
{{/summary}}{{#allParams}}
|
{{/summary}}
|
||||||
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
{{#allParams}}
|
||||||
|
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
|
{{/allParams}}
|
||||||
- returns: Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
- returns: Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
||||||
*/
|
*/
|
||||||
open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
||||||
@ -89,19 +96,26 @@ open class {{classname}}: APIBase {
|
|||||||
{{#summary}}
|
{{#summary}}
|
||||||
{{{summary}}}
|
{{{summary}}}
|
||||||
{{/summary}}
|
{{/summary}}
|
||||||
- {{httpMethod}} {{{path}}}{{#notes}}
|
- {{httpMethod}} {{{path}}}
|
||||||
- {{{notes}}}{{/notes}}{{#subresourceOperation}}
|
{{#notes}}
|
||||||
- subresourceOperation: {{subresourceOperation}}{{/subresourceOperation}}{{#defaultResponse}}
|
- {{{notes}}}
|
||||||
- defaultResponse: {{defaultResponse}}{{/defaultResponse}}{{#authMethods}}
|
{{/notes}}
|
||||||
|
{{#subresourceOperation}}
|
||||||
|
- subresourceOperation: {{subresourceOperation}}
|
||||||
|
{{/subresourceOperation}}
|
||||||
|
{{#defaultResponse}}
|
||||||
|
- defaultResponse: {{defaultResponse}}
|
||||||
|
{{/defaultResponse}}
|
||||||
|
{{#authMethods}}
|
||||||
- {{#isBasic}}BASIC{{/isBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}:
|
- {{#isBasic}}BASIC{{/isBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}:
|
||||||
- type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}}
|
- type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}}
|
||||||
- name: {{name}}{{/authMethods}}{{#responseHeaders}}
|
- name: {{name}}{{/authMethods}}{{#responseHeaders}}
|
||||||
- responseHeaders: {{responseHeaders}}{{/responseHeaders}}{{#examples}}
|
- responseHeaders: {{responseHeaders}}{{/responseHeaders}}{{#examples}}
|
||||||
- examples: {{{examples}}}{{/examples}}{{#externalDocs}}
|
- examples: {{{examples}}}{{/examples}}{{#externalDocs}}
|
||||||
- externalDocs: {{externalDocs}}{{/externalDocs}}{{#hasParams}}
|
- externalDocs: {{externalDocs}}{{/externalDocs}}
|
||||||
{{/hasParams}}{{#allParams}}
|
{{#allParams}}
|
||||||
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
|
{{/allParams}}
|
||||||
- returns: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{description}}
|
- returns: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{description}}
|
||||||
*/
|
*/
|
||||||
open class func {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
open class func {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
||||||
@ -134,11 +148,17 @@ open class {{classname}}: APIBase {
|
|||||||
{{> _param}}{{#hasMore}}, {{/hasMore}}
|
{{> _param}}{{#hasMore}}, {{/hasMore}}
|
||||||
{{/queryParams}}
|
{{/queryParams}}
|
||||||
])
|
])
|
||||||
{{/hasQueryParams}}{{#headerParams}}{{^secondaryParam}}
|
{{/hasQueryParams}}
|
||||||
let nillableHeaders: [String: Any?] = [{{/secondaryParam}}
|
{{#headerParams}}
|
||||||
{{> _param}}{{#hasMore}},{{/hasMore}}{{^hasMore}}
|
{{^secondaryParam}}
|
||||||
|
let nillableHeaders: [String: Any?] = [
|
||||||
|
{{/secondaryParam}}
|
||||||
|
{{> _param}}{{#hasMore}},{{/hasMore}}
|
||||||
|
{{^hasMore}}
|
||||||
]
|
]
|
||||||
let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders){{/hasMore}}{{/headerParams}}
|
let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders)
|
||||||
|
{{/hasMore}}
|
||||||
|
{{/headerParams}}
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}API.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}API.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{{#models}}{{#model}}//
|
{{#models}}
|
||||||
|
{{#model}}
|
||||||
|
//
|
||||||
// {{classname}}.swift
|
// {{classname}}.swift
|
||||||
//
|
//
|
||||||
// Generated by swagger-codegen
|
// Generated by swagger-codegen
|
||||||
|
@ -9,10 +9,8 @@ import Foundation
|
|||||||
import Alamofire
|
import Alamofire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class FakeAPI: APIBase {
|
open class FakeAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,10 +24,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/boolean
|
- POST /fake/outer/boolean
|
||||||
- Test serialization of outer boolean types
|
- Test serialization of outer boolean types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- returns: RequestBuilder<OuterBoolean>
|
- returns: RequestBuilder<OuterBoolean>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterBooleanSerializeWithRequestBuilder(body: OuterBoolean? = nil) -> RequestBuilder<OuterBoolean> {
|
open class func fakeOuterBooleanSerializeWithRequestBuilder(body: OuterBoolean? = nil) -> RequestBuilder<OuterBoolean> {
|
||||||
@ -39,14 +36,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterBoolean>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterBoolean>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -60,14 +55,13 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/composite
|
- POST /fake/outer/composite
|
||||||
- Test serialization of object with outer number type
|
- Test serialization of object with outer number type
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"my_string" : { },
|
"my_string" : { },
|
||||||
"my_number" : { },
|
"my_number" : { },
|
||||||
"my_boolean" : { }
|
"my_boolean" : { }
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<OuterComposite>
|
- returns: RequestBuilder<OuterComposite>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder<OuterComposite> {
|
open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder<OuterComposite> {
|
||||||
@ -77,14 +71,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -98,10 +90,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/number
|
- POST /fake/outer/number
|
||||||
- Test serialization of outer number types
|
- Test serialization of outer number types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- returns: RequestBuilder<OuterNumber>
|
- returns: RequestBuilder<OuterNumber>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterNumberSerializeWithRequestBuilder(body: OuterNumber? = nil) -> RequestBuilder<OuterNumber> {
|
open class func fakeOuterNumberSerializeWithRequestBuilder(body: OuterNumber? = nil) -> RequestBuilder<OuterNumber> {
|
||||||
@ -111,14 +102,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterNumber>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterNumber>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -132,10 +121,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/string
|
- POST /fake/outer/string
|
||||||
- Test serialization of outer string types
|
- Test serialization of outer string types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- returns: RequestBuilder<OuterString>
|
- returns: RequestBuilder<OuterString>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterStringSerializeWithRequestBuilder(body: OuterString? = nil) -> RequestBuilder<OuterString> {
|
open class func fakeOuterStringSerializeWithRequestBuilder(body: OuterString? = nil) -> RequestBuilder<OuterString> {
|
||||||
@ -145,7 +133,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterString>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterString>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -153,7 +140,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -168,12 +154,11 @@ open class FakeAPI: APIBase {
|
|||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
- PATCH /fake
|
- PATCH /fake
|
||||||
- To test \"client\" model
|
- To test \"client\" model
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
- returns: RequestBuilder<Client>
|
- returns: RequestBuilder<Client>
|
||||||
*/
|
*/
|
||||||
open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
||||||
@ -183,7 +168,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -191,7 +175,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -222,7 +205,6 @@ open class FakeAPI: APIBase {
|
|||||||
- BASIC:
|
- BASIC:
|
||||||
- type: basic
|
- type: basic
|
||||||
- name: http_basic_test
|
- name: http_basic_test
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -237,7 +219,6 @@ open class FakeAPI: APIBase {
|
|||||||
- parameter dateTime: (form) None (optional)
|
- parameter dateTime: (form) None (optional)
|
||||||
- parameter password: (form) None (optional)
|
- parameter password: (form) None (optional)
|
||||||
- parameter callback: (form) None (optional)
|
- parameter callback: (form) None (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int32? = nil, int32: Int32? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: ISOFullDate? = 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: Int32? = nil, int32: Int32? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: ISOFullDate? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -265,7 +246,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -340,7 +320,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -362,7 +341,7 @@ open class FakeAPI: APIBase {
|
|||||||
To test enum parameters
|
To test enum parameters
|
||||||
- GET /fake
|
- GET /fake
|
||||||
- To test enum parameters
|
- To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -371,7 +350,6 @@ open class FakeAPI: APIBase {
|
|||||||
- parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg)
|
- parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumQueryInteger: (query) Query parameter enum test (double) (optional)
|
- parameter enumQueryInteger: (query) Query parameter enum test (double) (optional)
|
||||||
- parameter enumQueryDouble: (form) Query parameter enum test (double) (optional)
|
- parameter enumQueryDouble: (form) Query parameter enum test (double) (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testEnumParametersWithRequestBuilder(enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil) -> RequestBuilder<Void> {
|
open class func testEnumParametersWithRequestBuilder(enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil) -> RequestBuilder<Void> {
|
||||||
@ -392,7 +370,6 @@ open class FakeAPI: APIBase {
|
|||||||
"enum_query_string": enumQueryString?.rawValue,
|
"enum_query_string": enumQueryString?.rawValue,
|
||||||
"enum_query_integer": enumQueryInteger?.rawValue
|
"enum_query_integer": enumQueryInteger?.rawValue
|
||||||
])
|
])
|
||||||
|
|
||||||
let nillableHeaders: [String: Any?] = [
|
let nillableHeaders: [String: Any?] = [
|
||||||
"enum_header_string_array": enumHeaderStringArray,
|
"enum_header_string_array": enumHeaderStringArray,
|
||||||
"enum_header_string": enumHeaderString?.rawValue
|
"enum_header_string": enumHeaderString?.rawValue
|
||||||
@ -406,7 +383,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -422,10 +398,9 @@ open class FakeAPI: APIBase {
|
|||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
- GET /fake/jsonFormData
|
- GET /fake/jsonFormData
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder<Void> {
|
open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder<Void> {
|
||||||
@ -441,7 +416,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
|
@ -9,11 +9,9 @@ import Foundation
|
|||||||
import Alamofire
|
import Alamofire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class Fake_classname_tags123API: APIBase {
|
open class Fake_classname_tags123API: APIBase {
|
||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -27,12 +25,11 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
- PATCH /fake_classname_test
|
- PATCH /fake_classname_test
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
- returns: RequestBuilder<Client>
|
- returns: RequestBuilder<Client>
|
||||||
*/
|
*/
|
||||||
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
||||||
@ -42,7 +39,6 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -9,11 +9,9 @@ import Foundation
|
|||||||
import Alamofire
|
import Alamofire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class PetAPI: APIBase {
|
open class PetAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -31,9 +29,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
||||||
@ -43,7 +39,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -51,7 +46,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -70,10 +64,8 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder<Void> {
|
open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -83,7 +75,6 @@ open class PetAPI: APIBase {
|
|||||||
let parameters: [String:Any]? = nil
|
let parameters: [String:Any]? = nil
|
||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
let nillableHeaders: [String: Any?] = [
|
let nillableHeaders: [String: Any?] = [
|
||||||
"api_key": apiKey
|
"api_key": apiKey
|
||||||
]
|
]
|
||||||
@ -105,7 +96,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -169,9 +159,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
} ]}]
|
} ]}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
|
|
||||||
- returns: RequestBuilder<[Pet]>
|
- returns: RequestBuilder<[Pet]>
|
||||||
*/
|
*/
|
||||||
open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> {
|
open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> {
|
||||||
@ -183,7 +171,6 @@ open class PetAPI: APIBase {
|
|||||||
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
||||||
"status": status
|
"status": status
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -192,7 +179,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -256,9 +242,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
} ]}]
|
} ]}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
|
|
||||||
- returns: RequestBuilder<[Pet]>
|
- returns: RequestBuilder<[Pet]>
|
||||||
*/
|
*/
|
||||||
open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> {
|
open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> {
|
||||||
@ -270,7 +254,6 @@ open class PetAPI: APIBase {
|
|||||||
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
||||||
"tags": tags
|
"tags": tags
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -279,7 +262,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -343,9 +325,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
|
|
||||||
- returns: RequestBuilder<Pet>
|
- returns: RequestBuilder<Pet>
|
||||||
*/
|
*/
|
||||||
open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder<Pet> {
|
open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder<Pet> {
|
||||||
@ -356,7 +336,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -364,7 +343,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -382,9 +360,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
||||||
@ -394,7 +370,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -402,7 +377,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
@ -422,11 +396,9 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder<Void> {
|
open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -443,7 +415,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -451,7 +422,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
@ -476,11 +446,9 @@ open class PetAPI: APIBase {
|
|||||||
"type" : "aeiou",
|
"type" : "aeiou",
|
||||||
"message" : "aeiou"
|
"message" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<ApiResponse>
|
- returns: RequestBuilder<ApiResponse>
|
||||||
*/
|
*/
|
||||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||||
@ -497,7 +465,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
|
@ -9,11 +9,9 @@ import Foundation
|
|||||||
import Alamofire
|
import Alamofire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class StoreAPI: APIBase {
|
open class StoreAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -28,9 +26,8 @@ open class StoreAPI: APIBase {
|
|||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
- DELETE /store/order/{order_id}
|
- DELETE /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
|
||||||
|
|
||||||
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder<Void> {
|
open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder<Void> {
|
||||||
@ -41,7 +38,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -49,7 +45,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
|
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
open class func getInventory(completion: @escaping ((_ data: [String:Int32]?, _ error: ErrorResponse?) -> Void)) {
|
open class func getInventory(completion: @escaping ((_ data: [String:Int32]?, _ error: ErrorResponse?) -> Void)) {
|
||||||
@ -69,7 +64,6 @@ open class StoreAPI: APIBase {
|
|||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 0
|
"key" : 0
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> {
|
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> {
|
||||||
@ -79,7 +73,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -87,7 +80,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -102,39 +94,38 @@ open class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{order_id}
|
- GET /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- returns: RequestBuilder<Order>
|
- returns: RequestBuilder<Order>
|
||||||
*/
|
*/
|
||||||
open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder<Order> {
|
open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder<Order> {
|
||||||
@ -145,7 +136,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -153,7 +143,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -168,39 +157,38 @@ open class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- returns: RequestBuilder<Order>
|
- returns: RequestBuilder<Order>
|
||||||
*/
|
*/
|
||||||
open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder<Order> {
|
open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder<Order> {
|
||||||
@ -210,7 +198,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -9,11 +9,9 @@ import Foundation
|
|||||||
import Alamofire
|
import Alamofire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class UserAPI: APIBase {
|
open class UserAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
- parameter body: (body) Created user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -28,9 +26,8 @@ open class UserAPI: APIBase {
|
|||||||
Create user
|
Create user
|
||||||
- POST /user
|
- POST /user
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) Created user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUserWithRequestBuilder(body: User) -> RequestBuilder<Void> {
|
open class func createUserWithRequestBuilder(body: User) -> RequestBuilder<Void> {
|
||||||
@ -40,7 +37,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -48,7 +44,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -63,9 +58,8 @@ open class UserAPI: APIBase {
|
|||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
- POST /user/createWithArray
|
- POST /user/createWithArray
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) List of user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
||||||
@ -75,7 +69,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -83,7 +76,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -98,9 +90,8 @@ open class UserAPI: APIBase {
|
|||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
- POST /user/createWithList
|
- POST /user/createWithList
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) List of user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
||||||
@ -110,7 +101,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -118,7 +108,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Delete user
|
Delete user
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -133,9 +122,8 @@ open class UserAPI: APIBase {
|
|||||||
Delete user
|
Delete user
|
||||||
- DELETE /user/{username}
|
- DELETE /user/{username}
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
|
||||||
|
|
||||||
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder<Void> {
|
open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder<Void> {
|
||||||
@ -146,7 +134,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -154,7 +141,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -169,47 +155,46 @@ open class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/xml, example=<User>
|
|
||||||
<id>123456789</id>
|
|
||||||
<username>aeiou</username>
|
|
||||||
<firstName>aeiou</firstName>
|
|
||||||
<lastName>aeiou</lastName>
|
|
||||||
<email>aeiou</email>
|
|
||||||
<password>aeiou</password>
|
|
||||||
<phone>aeiou</phone>
|
|
||||||
<userStatus>123</userStatus>
|
|
||||||
</User>}, {contentType=application/json, example={
|
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 0,
|
|
||||||
"email" : "aeiou",
|
|
||||||
"username" : "aeiou"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<User>
|
|
||||||
<id>123456789</id>
|
|
||||||
<username>aeiou</username>
|
|
||||||
<firstName>aeiou</firstName>
|
|
||||||
<lastName>aeiou</lastName>
|
|
||||||
<email>aeiou</email>
|
|
||||||
<password>aeiou</password>
|
|
||||||
<phone>aeiou</phone>
|
|
||||||
<userStatus>123</userStatus>
|
|
||||||
</User>}, {contentType=application/json, example={
|
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 0,
|
|
||||||
"email" : "aeiou",
|
|
||||||
"username" : "aeiou"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
|
<id>123456789</id>
|
||||||
|
<username>aeiou</username>
|
||||||
|
<firstName>aeiou</firstName>
|
||||||
|
<lastName>aeiou</lastName>
|
||||||
|
<email>aeiou</email>
|
||||||
|
<password>aeiou</password>
|
||||||
|
<phone>aeiou</phone>
|
||||||
|
<userStatus>123</userStatus>
|
||||||
|
</User>}, {contentType=application/json, example={
|
||||||
|
"firstName" : "aeiou",
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
|
<id>123456789</id>
|
||||||
|
<username>aeiou</username>
|
||||||
|
<firstName>aeiou</firstName>
|
||||||
|
<lastName>aeiou</lastName>
|
||||||
|
<email>aeiou</email>
|
||||||
|
<password>aeiou</password>
|
||||||
|
<phone>aeiou</phone>
|
||||||
|
<userStatus>123</userStatus>
|
||||||
|
</User>}, {contentType=application/json, example={
|
||||||
|
"firstName" : "aeiou",
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- returns: RequestBuilder<User>
|
- returns: RequestBuilder<User>
|
||||||
*/
|
*/
|
||||||
open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder<User> {
|
open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder<User> {
|
||||||
@ -220,7 +205,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -228,7 +212,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -244,14 +227,13 @@ open class UserAPI: APIBase {
|
|||||||
Logs user into the system
|
Logs user into the system
|
||||||
- GET /user/login
|
- GET /user/login
|
||||||
-
|
-
|
||||||
|
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
|
|
||||||
- returns: RequestBuilder<String>
|
- returns: RequestBuilder<String>
|
||||||
*/
|
*/
|
||||||
open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder<String> {
|
open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder<String> {
|
||||||
@ -264,7 +246,6 @@ open class UserAPI: APIBase {
|
|||||||
"username": username,
|
"username": username,
|
||||||
"password": password
|
"password": password
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -273,7 +254,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
open class func logoutUser(completion: @escaping ((_ error: ErrorResponse?) -> Void)) {
|
open class func logoutUser(completion: @escaping ((_ error: ErrorResponse?) -> Void)) {
|
||||||
@ -297,7 +277,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -305,7 +284,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -321,10 +299,9 @@ open class UserAPI: APIBase {
|
|||||||
Updated user
|
Updated user
|
||||||
- PUT /user/{username}
|
- PUT /user/{username}
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder<Void> {
|
open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder<Void> {
|
||||||
@ -335,7 +312,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -249,7 +249,7 @@ class Decoders {
|
|||||||
} else {
|
} else {
|
||||||
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decoder for AdditionalPropertiesClass
|
// Decoder for AdditionalPropertiesClass
|
||||||
Decoders.addDecoder(clazz: AdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<AdditionalPropertiesClass> in
|
Decoders.addDecoder(clazz: AdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<AdditionalPropertiesClass> in
|
||||||
@ -272,8 +272,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "AdditionalPropertiesClass", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "AdditionalPropertiesClass", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Animal
|
// Decoder for Animal
|
||||||
Decoders.addDecoder(clazz: Animal.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Animal> in
|
Decoders.addDecoder(clazz: Animal.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Animal> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -299,11 +297,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Animal", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Animal", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ApiResponse
|
// Decoder for ApiResponse
|
||||||
Decoders.addDecoder(clazz: ApiResponse.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ApiResponse> in
|
Decoders.addDecoder(clazz: ApiResponse.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ApiResponse> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -331,8 +324,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ApiResponse", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ApiResponse", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayOfArrayOfNumberOnly
|
// Decoder for ArrayOfArrayOfNumberOnly
|
||||||
Decoders.addDecoder(clazz: ArrayOfArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfArrayOfNumberOnly> in
|
Decoders.addDecoder(clazz: ArrayOfArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfArrayOfNumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -348,8 +339,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayOfArrayOfNumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayOfArrayOfNumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayOfNumberOnly
|
// Decoder for ArrayOfNumberOnly
|
||||||
Decoders.addDecoder(clazz: ArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfNumberOnly> in
|
Decoders.addDecoder(clazz: ArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfNumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -365,8 +354,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayOfNumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayOfNumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayTest
|
// Decoder for ArrayTest
|
||||||
Decoders.addDecoder(clazz: ArrayTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayTest> in
|
Decoders.addDecoder(clazz: ArrayTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -394,8 +381,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Capitalization
|
// Decoder for Capitalization
|
||||||
Decoders.addDecoder(clazz: Capitalization.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Capitalization> in
|
Decoders.addDecoder(clazz: Capitalization.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Capitalization> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -441,8 +426,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Capitalization", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Capitalization", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Category
|
// Decoder for Category
|
||||||
Decoders.addDecoder(clazz: Category.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Category> in
|
Decoders.addDecoder(clazz: Category.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Category> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -464,8 +447,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Category", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Category", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ClassModel
|
// Decoder for ClassModel
|
||||||
Decoders.addDecoder(clazz: ClassModel.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ClassModel> in
|
Decoders.addDecoder(clazz: ClassModel.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ClassModel> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -481,8 +462,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ClassModel", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ClassModel", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Client
|
// Decoder for Client
|
||||||
Decoders.addDecoder(clazz: Client.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Client> in
|
Decoders.addDecoder(clazz: Client.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Client> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -498,8 +477,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Client", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Client", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumArrays
|
// Decoder for EnumArrays
|
||||||
Decoders.addDecoder(clazz: EnumArrays.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumArrays> in
|
Decoders.addDecoder(clazz: EnumArrays.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumArrays> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -521,15 +498,11 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "EnumArrays", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "EnumArrays", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumClass
|
// Decoder for EnumClass
|
||||||
Decoders.addDecoder(clazz: EnumClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumClass> in
|
Decoders.addDecoder(clazz: EnumClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumClass> in
|
||||||
//TODO: I don't think we need this anymore
|
//TODO: I don't think we need this anymore
|
||||||
return Decoders.decode(clazz: EnumClass.self, source: source, instance: instance)
|
return Decoders.decode(clazz: EnumClass.self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumTest
|
// Decoder for EnumTest
|
||||||
Decoders.addDecoder(clazz: EnumTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumTest> in
|
Decoders.addDecoder(clazz: EnumTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -563,8 +536,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "EnumTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "EnumTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for FormatTest
|
// Decoder for FormatTest
|
||||||
Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<FormatTest> in
|
Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<FormatTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -652,8 +623,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "FormatTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "FormatTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for HasOnlyReadOnly
|
// Decoder for HasOnlyReadOnly
|
||||||
Decoders.addDecoder(clazz: HasOnlyReadOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<HasOnlyReadOnly> in
|
Decoders.addDecoder(clazz: HasOnlyReadOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<HasOnlyReadOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -675,8 +644,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "HasOnlyReadOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "HasOnlyReadOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for List
|
// Decoder for List
|
||||||
Decoders.addDecoder(clazz: List.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<List> in
|
Decoders.addDecoder(clazz: List.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<List> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -692,8 +659,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "List", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "List", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for MapTest
|
// Decoder for MapTest
|
||||||
Decoders.addDecoder(clazz: MapTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MapTest> in
|
Decoders.addDecoder(clazz: MapTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MapTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -715,8 +680,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "MapTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "MapTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||||
Decoders.addDecoder(clazz: MixedPropertiesAndAdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MixedPropertiesAndAdditionalPropertiesClass> in
|
Decoders.addDecoder(clazz: MixedPropertiesAndAdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MixedPropertiesAndAdditionalPropertiesClass> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -744,8 +707,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "MixedPropertiesAndAdditionalPropertiesClass", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "MixedPropertiesAndAdditionalPropertiesClass", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Model200Response
|
// Decoder for Model200Response
|
||||||
Decoders.addDecoder(clazz: Model200Response.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Model200Response> in
|
Decoders.addDecoder(clazz: Model200Response.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Model200Response> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -767,8 +728,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Model200Response", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Model200Response", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Name
|
// Decoder for Name
|
||||||
Decoders.addDecoder(clazz: Name.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Name> in
|
Decoders.addDecoder(clazz: Name.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Name> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -802,8 +761,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Name", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Name", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for NumberOnly
|
// Decoder for NumberOnly
|
||||||
Decoders.addDecoder(clazz: NumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<NumberOnly> in
|
Decoders.addDecoder(clazz: NumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<NumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -819,8 +776,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "NumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "NumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Order
|
// Decoder for Order
|
||||||
Decoders.addDecoder(clazz: Order.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Order> in
|
Decoders.addDecoder(clazz: Order.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Order> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -866,8 +821,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Order", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Order", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterBoolean
|
// Decoder for OuterBoolean
|
||||||
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
||||||
if let source = source as? Bool {
|
if let source = source as? Bool {
|
||||||
@ -876,8 +829,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterComposite
|
// Decoder for OuterComposite
|
||||||
Decoders.addDecoder(clazz: OuterComposite.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterComposite> in
|
Decoders.addDecoder(clazz: OuterComposite.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterComposite> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -905,15 +856,11 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "OuterComposite", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "OuterComposite", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterEnum
|
// Decoder for OuterEnum
|
||||||
Decoders.addDecoder(clazz: OuterEnum.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterEnum> in
|
Decoders.addDecoder(clazz: OuterEnum.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterEnum> in
|
||||||
//TODO: I don't think we need this anymore
|
//TODO: I don't think we need this anymore
|
||||||
return Decoders.decode(clazz: OuterEnum.self, source: source, instance: instance)
|
return Decoders.decode(clazz: OuterEnum.self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterNumber
|
// Decoder for OuterNumber
|
||||||
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
||||||
if let source = source as? Double {
|
if let source = source as? Double {
|
||||||
@ -922,8 +869,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterString
|
// Decoder for OuterString
|
||||||
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
||||||
if let source = source as? String {
|
if let source = source as? String {
|
||||||
@ -932,8 +877,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Pet
|
// Decoder for Pet
|
||||||
Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Pet> in
|
Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Pet> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -979,8 +922,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Pet", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Pet", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ReadOnlyFirst
|
// Decoder for ReadOnlyFirst
|
||||||
Decoders.addDecoder(clazz: ReadOnlyFirst.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ReadOnlyFirst> in
|
Decoders.addDecoder(clazz: ReadOnlyFirst.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ReadOnlyFirst> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1002,8 +943,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ReadOnlyFirst", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ReadOnlyFirst", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Return
|
// Decoder for Return
|
||||||
Decoders.addDecoder(clazz: Return.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Return> in
|
Decoders.addDecoder(clazz: Return.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Return> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1019,8 +958,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Return", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Return", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for SpecialModelName
|
// Decoder for SpecialModelName
|
||||||
Decoders.addDecoder(clazz: SpecialModelName.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<SpecialModelName> in
|
Decoders.addDecoder(clazz: SpecialModelName.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<SpecialModelName> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1036,8 +973,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "SpecialModelName", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "SpecialModelName", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Tag
|
// Decoder for Tag
|
||||||
Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Tag> in
|
Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Tag> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1059,8 +994,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Tag", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Tag", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for User
|
// Decoder for User
|
||||||
Decoders.addDecoder(clazz: User.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<User> in
|
Decoders.addDecoder(clazz: User.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<User> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1118,8 +1051,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "User", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "User", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Cat
|
// Decoder for Cat
|
||||||
Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Cat> in
|
Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Cat> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1150,8 +1081,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Cat", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Cat", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Dog
|
// Decoder for Dog
|
||||||
Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Dog> in
|
Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Dog> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
|
@ -10,10 +10,8 @@ import Alamofire
|
|||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class FakeAPI: APIBase {
|
open class FakeAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -24,7 +22,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- returns: Promise<OuterBoolean>
|
- returns: Promise<OuterBoolean>
|
||||||
*/
|
*/
|
||||||
@ -43,10 +40,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/boolean
|
- POST /fake/outer/boolean
|
||||||
- Test serialization of outer boolean types
|
- Test serialization of outer boolean types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- returns: RequestBuilder<OuterBoolean>
|
- returns: RequestBuilder<OuterBoolean>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterBooleanSerializeWithRequestBuilder(body: OuterBoolean? = nil) -> RequestBuilder<OuterBoolean> {
|
open class func fakeOuterBooleanSerializeWithRequestBuilder(body: OuterBoolean? = nil) -> RequestBuilder<OuterBoolean> {
|
||||||
@ -56,14 +52,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterBoolean>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterBoolean>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -74,7 +68,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
- returns: Promise<OuterComposite>
|
- returns: Promise<OuterComposite>
|
||||||
*/
|
*/
|
||||||
@ -93,14 +86,13 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/composite
|
- POST /fake/outer/composite
|
||||||
- Test serialization of object with outer number type
|
- Test serialization of object with outer number type
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"my_string" : { },
|
"my_string" : { },
|
||||||
"my_number" : { },
|
"my_number" : { },
|
||||||
"my_boolean" : { }
|
"my_boolean" : { }
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<OuterComposite>
|
- returns: RequestBuilder<OuterComposite>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder<OuterComposite> {
|
open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder<OuterComposite> {
|
||||||
@ -110,14 +102,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -128,7 +118,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- returns: Promise<OuterNumber>
|
- returns: Promise<OuterNumber>
|
||||||
*/
|
*/
|
||||||
@ -147,10 +136,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/number
|
- POST /fake/outer/number
|
||||||
- Test serialization of outer number types
|
- Test serialization of outer number types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- returns: RequestBuilder<OuterNumber>
|
- returns: RequestBuilder<OuterNumber>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterNumberSerializeWithRequestBuilder(body: OuterNumber? = nil) -> RequestBuilder<OuterNumber> {
|
open class func fakeOuterNumberSerializeWithRequestBuilder(body: OuterNumber? = nil) -> RequestBuilder<OuterNumber> {
|
||||||
@ -160,14 +148,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterNumber>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterNumber>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -178,7 +164,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- returns: Promise<OuterString>
|
- returns: Promise<OuterString>
|
||||||
*/
|
*/
|
||||||
@ -197,10 +182,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/string
|
- POST /fake/outer/string
|
||||||
- Test serialization of outer string types
|
- Test serialization of outer string types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- returns: RequestBuilder<OuterString>
|
- returns: RequestBuilder<OuterString>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterStringSerializeWithRequestBuilder(body: OuterString? = nil) -> RequestBuilder<OuterString> {
|
open class func fakeOuterStringSerializeWithRequestBuilder(body: OuterString? = nil) -> RequestBuilder<OuterString> {
|
||||||
@ -210,7 +194,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterString>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterString>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -218,7 +201,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -230,7 +212,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- returns: Promise<Client>
|
- returns: Promise<Client>
|
||||||
*/
|
*/
|
||||||
@ -250,12 +231,11 @@ open class FakeAPI: APIBase {
|
|||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
- PATCH /fake
|
- PATCH /fake
|
||||||
- To test \"client\" model
|
- To test \"client\" model
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
- returns: RequestBuilder<Client>
|
- returns: RequestBuilder<Client>
|
||||||
*/
|
*/
|
||||||
open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
||||||
@ -265,7 +245,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -273,7 +252,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -298,7 +276,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -334,7 +311,6 @@ open class FakeAPI: APIBase {
|
|||||||
- BASIC:
|
- BASIC:
|
||||||
- type: basic
|
- type: basic
|
||||||
- name: http_basic_test
|
- name: http_basic_test
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -349,7 +325,6 @@ open class FakeAPI: APIBase {
|
|||||||
- parameter dateTime: (form) None (optional)
|
- parameter dateTime: (form) None (optional)
|
||||||
- parameter password: (form) None (optional)
|
- parameter password: (form) None (optional)
|
||||||
- parameter callback: (form) None (optional)
|
- parameter callback: (form) None (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int32? = nil, int32: Int32? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: ISOFullDate? = 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: Int32? = nil, int32: Int32? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: ISOFullDate? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -377,7 +352,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -452,7 +426,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -471,7 +444,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -498,7 +470,7 @@ open class FakeAPI: APIBase {
|
|||||||
To test enum parameters
|
To test enum parameters
|
||||||
- GET /fake
|
- GET /fake
|
||||||
- To test enum parameters
|
- To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -507,7 +479,6 @@ open class FakeAPI: APIBase {
|
|||||||
- parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg)
|
- parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumQueryInteger: (query) Query parameter enum test (double) (optional)
|
- parameter enumQueryInteger: (query) Query parameter enum test (double) (optional)
|
||||||
- parameter enumQueryDouble: (form) Query parameter enum test (double) (optional)
|
- parameter enumQueryDouble: (form) Query parameter enum test (double) (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testEnumParametersWithRequestBuilder(enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil) -> RequestBuilder<Void> {
|
open class func testEnumParametersWithRequestBuilder(enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil) -> RequestBuilder<Void> {
|
||||||
@ -528,7 +499,6 @@ open class FakeAPI: APIBase {
|
|||||||
"enum_query_string": enumQueryString?.rawValue,
|
"enum_query_string": enumQueryString?.rawValue,
|
||||||
"enum_query_integer": enumQueryInteger?.rawValue
|
"enum_query_integer": enumQueryInteger?.rawValue
|
||||||
])
|
])
|
||||||
|
|
||||||
let nillableHeaders: [String: Any?] = [
|
let nillableHeaders: [String: Any?] = [
|
||||||
"enum_header_string_array": enumHeaderStringArray,
|
"enum_header_string_array": enumHeaderStringArray,
|
||||||
"enum_header_string": enumHeaderString?.rawValue
|
"enum_header_string": enumHeaderString?.rawValue
|
||||||
@ -542,7 +512,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -555,7 +524,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
@ -576,10 +544,9 @@ open class FakeAPI: APIBase {
|
|||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
- GET /fake/jsonFormData
|
- GET /fake/jsonFormData
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder<Void> {
|
open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder<Void> {
|
||||||
@ -595,7 +562,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class Fake_classname_tags123API: APIBase {
|
open class Fake_classname_tags123API: APIBase {
|
||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- returns: Promise<Client>
|
- returns: Promise<Client>
|
||||||
*/
|
*/
|
||||||
@ -45,12 +42,11 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
- PATCH /fake_classname_test
|
- PATCH /fake_classname_test
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
- returns: RequestBuilder<Client>
|
- returns: RequestBuilder<Client>
|
||||||
*/
|
*/
|
||||||
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
||||||
@ -60,7 +56,6 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class PetAPI: APIBase {
|
open class PetAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
@ -49,9 +46,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
||||||
@ -61,7 +56,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -69,7 +63,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -82,7 +75,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
@ -106,10 +98,8 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder<Void> {
|
open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -119,7 +109,6 @@ open class PetAPI: APIBase {
|
|||||||
let parameters: [String:Any]? = nil
|
let parameters: [String:Any]? = nil
|
||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
let nillableHeaders: [String: Any?] = [
|
let nillableHeaders: [String: Any?] = [
|
||||||
"api_key": apiKey
|
"api_key": apiKey
|
||||||
]
|
]
|
||||||
@ -141,7 +130,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -153,7 +141,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
- returns: Promise<[Pet]>
|
- returns: Promise<[Pet]>
|
||||||
*/
|
*/
|
||||||
@ -222,9 +209,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
} ]}]
|
} ]}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
|
|
||||||
- returns: RequestBuilder<[Pet]>
|
- returns: RequestBuilder<[Pet]>
|
||||||
*/
|
*/
|
||||||
open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> {
|
open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> {
|
||||||
@ -236,7 +221,6 @@ open class PetAPI: APIBase {
|
|||||||
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
||||||
"status": status
|
"status": status
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -245,7 +229,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -257,7 +240,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
- returns: Promise<[Pet]>
|
- returns: Promise<[Pet]>
|
||||||
*/
|
*/
|
||||||
@ -326,9 +308,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
} ]}]
|
} ]}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
|
|
||||||
- returns: RequestBuilder<[Pet]>
|
- returns: RequestBuilder<[Pet]>
|
||||||
*/
|
*/
|
||||||
open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> {
|
open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> {
|
||||||
@ -340,7 +320,6 @@ open class PetAPI: APIBase {
|
|||||||
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
||||||
"tags": tags
|
"tags": tags
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -349,7 +328,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -361,7 +339,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
- returns: Promise<Pet>
|
- returns: Promise<Pet>
|
||||||
*/
|
*/
|
||||||
@ -430,9 +407,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
|
|
||||||
- returns: RequestBuilder<Pet>
|
- returns: RequestBuilder<Pet>
|
||||||
*/
|
*/
|
||||||
open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder<Pet> {
|
open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder<Pet> {
|
||||||
@ -443,7 +418,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -451,7 +425,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -463,7 +436,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
@ -486,9 +458,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
||||||
@ -498,7 +468,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -506,7 +475,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
@ -520,7 +488,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
@ -545,11 +512,9 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder<Void> {
|
open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -566,7 +531,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -574,7 +538,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
@ -588,7 +551,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
@ -618,11 +580,9 @@ open class PetAPI: APIBase {
|
|||||||
"type" : "aeiou",
|
"type" : "aeiou",
|
||||||
"message" : "aeiou"
|
"message" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<ApiResponse>
|
- returns: RequestBuilder<ApiResponse>
|
||||||
*/
|
*/
|
||||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||||
@ -639,7 +599,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class StoreAPI: APIBase {
|
open class StoreAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
@ -46,9 +43,8 @@ open class StoreAPI: APIBase {
|
|||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
- DELETE /store/order/{order_id}
|
- DELETE /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
|
||||||
|
|
||||||
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder<Void> {
|
open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder<Void> {
|
||||||
@ -59,7 +55,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -67,7 +62,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
|
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
open class func getInventory(completion: @escaping ((_ data: [String:Int32]?, _ error: ErrorResponse?) -> Void)) {
|
open class func getInventory(completion: @escaping ((_ data: [String:Int32]?, _ error: ErrorResponse?) -> Void)) {
|
||||||
@ -78,7 +72,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
|
|
||||||
- returns: Promise<[String:Int32]>
|
- returns: Promise<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
open class func getInventory() -> Promise<[String:Int32]> {
|
open class func getInventory() -> Promise<[String:Int32]> {
|
||||||
@ -103,7 +96,6 @@ open class StoreAPI: APIBase {
|
|||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 0
|
"key" : 0
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> {
|
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> {
|
||||||
@ -113,7 +105,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -121,7 +112,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -133,7 +123,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- returns: Promise<Order>
|
- returns: Promise<Order>
|
||||||
*/
|
*/
|
||||||
@ -153,39 +142,38 @@ open class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{order_id}
|
- GET /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- returns: RequestBuilder<Order>
|
- returns: RequestBuilder<Order>
|
||||||
*/
|
*/
|
||||||
open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder<Order> {
|
open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder<Order> {
|
||||||
@ -196,7 +184,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -204,7 +191,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -216,7 +202,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- returns: Promise<Order>
|
- returns: Promise<Order>
|
||||||
*/
|
*/
|
||||||
@ -236,39 +221,38 @@ open class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- returns: RequestBuilder<Order>
|
- returns: RequestBuilder<Order>
|
||||||
*/
|
*/
|
||||||
open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder<Order> {
|
open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder<Order> {
|
||||||
@ -278,7 +262,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class UserAPI: APIBase {
|
open class UserAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
- parameter body: (body) Created user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
- parameter body: (body) Created user object
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
@ -46,9 +43,8 @@ open class UserAPI: APIBase {
|
|||||||
Create user
|
Create user
|
||||||
- POST /user
|
- POST /user
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) Created user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUserWithRequestBuilder(body: User) -> RequestBuilder<Void> {
|
open class func createUserWithRequestBuilder(body: User) -> RequestBuilder<Void> {
|
||||||
@ -58,7 +54,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -66,7 +61,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -78,7 +72,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
@ -98,9 +91,8 @@ open class UserAPI: APIBase {
|
|||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
- POST /user/createWithArray
|
- POST /user/createWithArray
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) List of user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
||||||
@ -110,7 +102,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -118,7 +109,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -130,7 +120,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
@ -150,9 +139,8 @@ open class UserAPI: APIBase {
|
|||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
- POST /user/createWithList
|
- POST /user/createWithList
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) List of user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
||||||
@ -162,7 +150,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -170,7 +157,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Delete user
|
Delete user
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -182,7 +168,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Delete user
|
Delete user
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
@ -202,9 +187,8 @@ open class UserAPI: APIBase {
|
|||||||
Delete user
|
Delete user
|
||||||
- DELETE /user/{username}
|
- DELETE /user/{username}
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
|
||||||
|
|
||||||
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder<Void> {
|
open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder<Void> {
|
||||||
@ -215,7 +199,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -223,7 +206,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -235,7 +217,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- returns: Promise<User>
|
- returns: Promise<User>
|
||||||
*/
|
*/
|
||||||
@ -255,47 +236,46 @@ open class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/xml, example=<User>
|
|
||||||
<id>123456789</id>
|
|
||||||
<username>aeiou</username>
|
|
||||||
<firstName>aeiou</firstName>
|
|
||||||
<lastName>aeiou</lastName>
|
|
||||||
<email>aeiou</email>
|
|
||||||
<password>aeiou</password>
|
|
||||||
<phone>aeiou</phone>
|
|
||||||
<userStatus>123</userStatus>
|
|
||||||
</User>}, {contentType=application/json, example={
|
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 0,
|
|
||||||
"email" : "aeiou",
|
|
||||||
"username" : "aeiou"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<User>
|
|
||||||
<id>123456789</id>
|
|
||||||
<username>aeiou</username>
|
|
||||||
<firstName>aeiou</firstName>
|
|
||||||
<lastName>aeiou</lastName>
|
|
||||||
<email>aeiou</email>
|
|
||||||
<password>aeiou</password>
|
|
||||||
<phone>aeiou</phone>
|
|
||||||
<userStatus>123</userStatus>
|
|
||||||
</User>}, {contentType=application/json, example={
|
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 0,
|
|
||||||
"email" : "aeiou",
|
|
||||||
"username" : "aeiou"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
|
<id>123456789</id>
|
||||||
|
<username>aeiou</username>
|
||||||
|
<firstName>aeiou</firstName>
|
||||||
|
<lastName>aeiou</lastName>
|
||||||
|
<email>aeiou</email>
|
||||||
|
<password>aeiou</password>
|
||||||
|
<phone>aeiou</phone>
|
||||||
|
<userStatus>123</userStatus>
|
||||||
|
</User>}, {contentType=application/json, example={
|
||||||
|
"firstName" : "aeiou",
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
|
<id>123456789</id>
|
||||||
|
<username>aeiou</username>
|
||||||
|
<firstName>aeiou</firstName>
|
||||||
|
<lastName>aeiou</lastName>
|
||||||
|
<email>aeiou</email>
|
||||||
|
<password>aeiou</password>
|
||||||
|
<phone>aeiou</phone>
|
||||||
|
<userStatus>123</userStatus>
|
||||||
|
</User>}, {contentType=application/json, example={
|
||||||
|
"firstName" : "aeiou",
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- returns: RequestBuilder<User>
|
- returns: RequestBuilder<User>
|
||||||
*/
|
*/
|
||||||
open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder<User> {
|
open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder<User> {
|
||||||
@ -306,7 +286,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -314,7 +293,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -327,7 +305,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
- returns: Promise<String>
|
- returns: Promise<String>
|
||||||
@ -348,14 +325,13 @@ open class UserAPI: APIBase {
|
|||||||
Logs user into the system
|
Logs user into the system
|
||||||
- GET /user/login
|
- GET /user/login
|
||||||
-
|
-
|
||||||
|
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
|
|
||||||
- returns: RequestBuilder<String>
|
- returns: RequestBuilder<String>
|
||||||
*/
|
*/
|
||||||
open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder<String> {
|
open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder<String> {
|
||||||
@ -368,7 +344,6 @@ open class UserAPI: APIBase {
|
|||||||
"username": username,
|
"username": username,
|
||||||
"password": password
|
"password": password
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -377,7 +352,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
open class func logoutUser(completion: @escaping ((_ error: ErrorResponse?) -> Void)) {
|
open class func logoutUser(completion: @escaping ((_ error: ErrorResponse?) -> Void)) {
|
||||||
@ -388,7 +362,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
*/
|
*/
|
||||||
open class func logoutUser() -> Promise<Void> {
|
open class func logoutUser() -> Promise<Void> {
|
||||||
@ -417,7 +390,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -425,7 +397,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -438,7 +409,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
- returns: Promise<Void>
|
- returns: Promise<Void>
|
||||||
@ -459,10 +429,9 @@ open class UserAPI: APIBase {
|
|||||||
Updated user
|
Updated user
|
||||||
- PUT /user/{username}
|
- PUT /user/{username}
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder<Void> {
|
open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder<Void> {
|
||||||
@ -473,7 +442,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -249,7 +249,7 @@ class Decoders {
|
|||||||
} else {
|
} else {
|
||||||
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decoder for AdditionalPropertiesClass
|
// Decoder for AdditionalPropertiesClass
|
||||||
Decoders.addDecoder(clazz: AdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<AdditionalPropertiesClass> in
|
Decoders.addDecoder(clazz: AdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<AdditionalPropertiesClass> in
|
||||||
@ -272,8 +272,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "AdditionalPropertiesClass", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "AdditionalPropertiesClass", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Animal
|
// Decoder for Animal
|
||||||
Decoders.addDecoder(clazz: Animal.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Animal> in
|
Decoders.addDecoder(clazz: Animal.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Animal> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -299,11 +297,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Animal", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Animal", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ApiResponse
|
// Decoder for ApiResponse
|
||||||
Decoders.addDecoder(clazz: ApiResponse.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ApiResponse> in
|
Decoders.addDecoder(clazz: ApiResponse.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ApiResponse> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -331,8 +324,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ApiResponse", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ApiResponse", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayOfArrayOfNumberOnly
|
// Decoder for ArrayOfArrayOfNumberOnly
|
||||||
Decoders.addDecoder(clazz: ArrayOfArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfArrayOfNumberOnly> in
|
Decoders.addDecoder(clazz: ArrayOfArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfArrayOfNumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -348,8 +339,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayOfArrayOfNumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayOfArrayOfNumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayOfNumberOnly
|
// Decoder for ArrayOfNumberOnly
|
||||||
Decoders.addDecoder(clazz: ArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfNumberOnly> in
|
Decoders.addDecoder(clazz: ArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfNumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -365,8 +354,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayOfNumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayOfNumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayTest
|
// Decoder for ArrayTest
|
||||||
Decoders.addDecoder(clazz: ArrayTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayTest> in
|
Decoders.addDecoder(clazz: ArrayTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -394,8 +381,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Capitalization
|
// Decoder for Capitalization
|
||||||
Decoders.addDecoder(clazz: Capitalization.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Capitalization> in
|
Decoders.addDecoder(clazz: Capitalization.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Capitalization> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -441,8 +426,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Capitalization", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Capitalization", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Category
|
// Decoder for Category
|
||||||
Decoders.addDecoder(clazz: Category.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Category> in
|
Decoders.addDecoder(clazz: Category.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Category> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -464,8 +447,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Category", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Category", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ClassModel
|
// Decoder for ClassModel
|
||||||
Decoders.addDecoder(clazz: ClassModel.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ClassModel> in
|
Decoders.addDecoder(clazz: ClassModel.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ClassModel> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -481,8 +462,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ClassModel", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ClassModel", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Client
|
// Decoder for Client
|
||||||
Decoders.addDecoder(clazz: Client.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Client> in
|
Decoders.addDecoder(clazz: Client.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Client> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -498,8 +477,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Client", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Client", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumArrays
|
// Decoder for EnumArrays
|
||||||
Decoders.addDecoder(clazz: EnumArrays.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumArrays> in
|
Decoders.addDecoder(clazz: EnumArrays.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumArrays> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -521,15 +498,11 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "EnumArrays", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "EnumArrays", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumClass
|
// Decoder for EnumClass
|
||||||
Decoders.addDecoder(clazz: EnumClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumClass> in
|
Decoders.addDecoder(clazz: EnumClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumClass> in
|
||||||
//TODO: I don't think we need this anymore
|
//TODO: I don't think we need this anymore
|
||||||
return Decoders.decode(clazz: EnumClass.self, source: source, instance: instance)
|
return Decoders.decode(clazz: EnumClass.self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumTest
|
// Decoder for EnumTest
|
||||||
Decoders.addDecoder(clazz: EnumTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumTest> in
|
Decoders.addDecoder(clazz: EnumTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -563,8 +536,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "EnumTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "EnumTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for FormatTest
|
// Decoder for FormatTest
|
||||||
Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<FormatTest> in
|
Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<FormatTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -652,8 +623,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "FormatTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "FormatTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for HasOnlyReadOnly
|
// Decoder for HasOnlyReadOnly
|
||||||
Decoders.addDecoder(clazz: HasOnlyReadOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<HasOnlyReadOnly> in
|
Decoders.addDecoder(clazz: HasOnlyReadOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<HasOnlyReadOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -675,8 +644,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "HasOnlyReadOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "HasOnlyReadOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for List
|
// Decoder for List
|
||||||
Decoders.addDecoder(clazz: List.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<List> in
|
Decoders.addDecoder(clazz: List.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<List> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -692,8 +659,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "List", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "List", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for MapTest
|
// Decoder for MapTest
|
||||||
Decoders.addDecoder(clazz: MapTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MapTest> in
|
Decoders.addDecoder(clazz: MapTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MapTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -715,8 +680,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "MapTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "MapTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||||
Decoders.addDecoder(clazz: MixedPropertiesAndAdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MixedPropertiesAndAdditionalPropertiesClass> in
|
Decoders.addDecoder(clazz: MixedPropertiesAndAdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MixedPropertiesAndAdditionalPropertiesClass> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -744,8 +707,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "MixedPropertiesAndAdditionalPropertiesClass", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "MixedPropertiesAndAdditionalPropertiesClass", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Model200Response
|
// Decoder for Model200Response
|
||||||
Decoders.addDecoder(clazz: Model200Response.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Model200Response> in
|
Decoders.addDecoder(clazz: Model200Response.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Model200Response> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -767,8 +728,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Model200Response", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Model200Response", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Name
|
// Decoder for Name
|
||||||
Decoders.addDecoder(clazz: Name.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Name> in
|
Decoders.addDecoder(clazz: Name.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Name> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -802,8 +761,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Name", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Name", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for NumberOnly
|
// Decoder for NumberOnly
|
||||||
Decoders.addDecoder(clazz: NumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<NumberOnly> in
|
Decoders.addDecoder(clazz: NumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<NumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -819,8 +776,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "NumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "NumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Order
|
// Decoder for Order
|
||||||
Decoders.addDecoder(clazz: Order.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Order> in
|
Decoders.addDecoder(clazz: Order.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Order> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -866,8 +821,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Order", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Order", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterBoolean
|
// Decoder for OuterBoolean
|
||||||
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
||||||
if let source = source as? Bool {
|
if let source = source as? Bool {
|
||||||
@ -876,8 +829,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterComposite
|
// Decoder for OuterComposite
|
||||||
Decoders.addDecoder(clazz: OuterComposite.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterComposite> in
|
Decoders.addDecoder(clazz: OuterComposite.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterComposite> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -905,15 +856,11 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "OuterComposite", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "OuterComposite", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterEnum
|
// Decoder for OuterEnum
|
||||||
Decoders.addDecoder(clazz: OuterEnum.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterEnum> in
|
Decoders.addDecoder(clazz: OuterEnum.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterEnum> in
|
||||||
//TODO: I don't think we need this anymore
|
//TODO: I don't think we need this anymore
|
||||||
return Decoders.decode(clazz: OuterEnum.self, source: source, instance: instance)
|
return Decoders.decode(clazz: OuterEnum.self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterNumber
|
// Decoder for OuterNumber
|
||||||
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
||||||
if let source = source as? Double {
|
if let source = source as? Double {
|
||||||
@ -922,8 +869,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterString
|
// Decoder for OuterString
|
||||||
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
||||||
if let source = source as? String {
|
if let source = source as? String {
|
||||||
@ -932,8 +877,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Pet
|
// Decoder for Pet
|
||||||
Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Pet> in
|
Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Pet> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -979,8 +922,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Pet", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Pet", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ReadOnlyFirst
|
// Decoder for ReadOnlyFirst
|
||||||
Decoders.addDecoder(clazz: ReadOnlyFirst.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ReadOnlyFirst> in
|
Decoders.addDecoder(clazz: ReadOnlyFirst.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ReadOnlyFirst> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1002,8 +943,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ReadOnlyFirst", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ReadOnlyFirst", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Return
|
// Decoder for Return
|
||||||
Decoders.addDecoder(clazz: Return.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Return> in
|
Decoders.addDecoder(clazz: Return.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Return> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1019,8 +958,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Return", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Return", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for SpecialModelName
|
// Decoder for SpecialModelName
|
||||||
Decoders.addDecoder(clazz: SpecialModelName.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<SpecialModelName> in
|
Decoders.addDecoder(clazz: SpecialModelName.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<SpecialModelName> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1036,8 +973,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "SpecialModelName", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "SpecialModelName", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Tag
|
// Decoder for Tag
|
||||||
Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Tag> in
|
Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Tag> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1059,8 +994,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Tag", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Tag", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for User
|
// Decoder for User
|
||||||
Decoders.addDecoder(clazz: User.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<User> in
|
Decoders.addDecoder(clazz: User.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<User> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1118,8 +1051,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "User", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "User", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Cat
|
// Decoder for Cat
|
||||||
Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Cat> in
|
Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Cat> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1150,8 +1081,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Cat", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Cat", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Dog
|
// Decoder for Dog
|
||||||
Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Dog> in
|
Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Dog> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
|
@ -10,10 +10,8 @@ import Alamofire
|
|||||||
import RxSwift
|
import RxSwift
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class FakeAPI: APIBase {
|
open class FakeAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -24,7 +22,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- returns: Observable<OuterBoolean>
|
- returns: Observable<OuterBoolean>
|
||||||
*/
|
*/
|
||||||
@ -45,10 +42,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/boolean
|
- POST /fake/outer/boolean
|
||||||
- Test serialization of outer boolean types
|
- Test serialization of outer boolean types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input boolean as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input boolean as post body (optional)
|
||||||
- returns: RequestBuilder<OuterBoolean>
|
- returns: RequestBuilder<OuterBoolean>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterBooleanSerializeWithRequestBuilder(body: OuterBoolean? = nil) -> RequestBuilder<OuterBoolean> {
|
open class func fakeOuterBooleanSerializeWithRequestBuilder(body: OuterBoolean? = nil) -> RequestBuilder<OuterBoolean> {
|
||||||
@ -58,14 +54,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterBoolean>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterBoolean>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -76,7 +70,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
- returns: Observable<OuterComposite>
|
- returns: Observable<OuterComposite>
|
||||||
*/
|
*/
|
||||||
@ -97,14 +90,13 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/composite
|
- POST /fake/outer/composite
|
||||||
- Test serialization of object with outer number type
|
- Test serialization of object with outer number type
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"my_string" : { },
|
"my_string" : { },
|
||||||
"my_number" : { },
|
"my_number" : { },
|
||||||
"my_boolean" : { }
|
"my_boolean" : { }
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) Input composite as post body (optional)
|
- parameter body: (body) Input composite as post body (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<OuterComposite>
|
- returns: RequestBuilder<OuterComposite>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder<OuterComposite> {
|
open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder<OuterComposite> {
|
||||||
@ -114,14 +106,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterComposite>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -132,7 +122,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- returns: Observable<OuterNumber>
|
- returns: Observable<OuterNumber>
|
||||||
*/
|
*/
|
||||||
@ -153,10 +142,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/number
|
- POST /fake/outer/number
|
||||||
- Test serialization of outer number types
|
- Test serialization of outer number types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input number as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input number as post body (optional)
|
||||||
- returns: RequestBuilder<OuterNumber>
|
- returns: RequestBuilder<OuterNumber>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterNumberSerializeWithRequestBuilder(body: OuterNumber? = nil) -> RequestBuilder<OuterNumber> {
|
open class func fakeOuterNumberSerializeWithRequestBuilder(body: OuterNumber? = nil) -> RequestBuilder<OuterNumber> {
|
||||||
@ -166,14 +154,12 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterNumber>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterNumber>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -184,7 +170,6 @@ open class FakeAPI: APIBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- returns: Observable<OuterString>
|
- returns: Observable<OuterString>
|
||||||
*/
|
*/
|
||||||
@ -205,10 +190,9 @@ open class FakeAPI: APIBase {
|
|||||||
/**
|
/**
|
||||||
- POST /fake/outer/string
|
- POST /fake/outer/string
|
||||||
- Test serialization of outer string types
|
- Test serialization of outer string types
|
||||||
- examples: [{contentType=application/json, example={ }}]
|
|
||||||
|
|
||||||
- parameter body: (body) Input string as post body (optional)
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/json, example={ }}]
|
||||||
|
- parameter body: (body) Input string as post body (optional)
|
||||||
- returns: RequestBuilder<OuterString>
|
- returns: RequestBuilder<OuterString>
|
||||||
*/
|
*/
|
||||||
open class func fakeOuterStringSerializeWithRequestBuilder(body: OuterString? = nil) -> RequestBuilder<OuterString> {
|
open class func fakeOuterStringSerializeWithRequestBuilder(body: OuterString? = nil) -> RequestBuilder<OuterString> {
|
||||||
@ -218,7 +202,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<OuterString>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<OuterString>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -226,7 +209,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -238,7 +220,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- returns: Observable<Client>
|
- returns: Observable<Client>
|
||||||
*/
|
*/
|
||||||
@ -260,12 +241,11 @@ open class FakeAPI: APIBase {
|
|||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
- PATCH /fake
|
- PATCH /fake
|
||||||
- To test \"client\" model
|
- To test \"client\" model
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
- returns: RequestBuilder<Client>
|
- returns: RequestBuilder<Client>
|
||||||
*/
|
*/
|
||||||
open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
||||||
@ -275,7 +255,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -283,7 +262,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -308,7 +286,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -346,7 +323,6 @@ open class FakeAPI: APIBase {
|
|||||||
- BASIC:
|
- BASIC:
|
||||||
- type: basic
|
- type: basic
|
||||||
- name: http_basic_test
|
- name: http_basic_test
|
||||||
|
|
||||||
- parameter number: (form) None
|
- parameter number: (form) None
|
||||||
- parameter double: (form) None
|
- parameter double: (form) None
|
||||||
- parameter patternWithoutDelimiter: (form) None
|
- parameter patternWithoutDelimiter: (form) None
|
||||||
@ -361,7 +337,6 @@ open class FakeAPI: APIBase {
|
|||||||
- parameter dateTime: (form) None (optional)
|
- parameter dateTime: (form) None (optional)
|
||||||
- parameter password: (form) None (optional)
|
- parameter password: (form) None (optional)
|
||||||
- parameter callback: (form) None (optional)
|
- parameter callback: (form) None (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int32? = nil, int32: Int32? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: ISOFullDate? = 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: Int32? = nil, int32: Int32? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: ISOFullDate? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -389,7 +364,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -464,7 +438,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -483,7 +456,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -512,7 +484,7 @@ open class FakeAPI: APIBase {
|
|||||||
To test enum parameters
|
To test enum parameters
|
||||||
- GET /fake
|
- GET /fake
|
||||||
- To test enum parameters
|
- To test enum parameters
|
||||||
|
|
||||||
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
- parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional)
|
||||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
- parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional)
|
||||||
@ -521,7 +493,6 @@ open class FakeAPI: APIBase {
|
|||||||
- parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg)
|
- parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to -efg)
|
||||||
- parameter enumQueryInteger: (query) Query parameter enum test (double) (optional)
|
- parameter enumQueryInteger: (query) Query parameter enum test (double) (optional)
|
||||||
- parameter enumQueryDouble: (form) Query parameter enum test (double) (optional)
|
- parameter enumQueryDouble: (form) Query parameter enum test (double) (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testEnumParametersWithRequestBuilder(enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil) -> RequestBuilder<Void> {
|
open class func testEnumParametersWithRequestBuilder(enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil) -> RequestBuilder<Void> {
|
||||||
@ -542,7 +513,6 @@ open class FakeAPI: APIBase {
|
|||||||
"enum_query_string": enumQueryString?.rawValue,
|
"enum_query_string": enumQueryString?.rawValue,
|
||||||
"enum_query_integer": enumQueryInteger?.rawValue
|
"enum_query_integer": enumQueryInteger?.rawValue
|
||||||
])
|
])
|
||||||
|
|
||||||
let nillableHeaders: [String: Any?] = [
|
let nillableHeaders: [String: Any?] = [
|
||||||
"enum_header_string_array": enumHeaderStringArray,
|
"enum_header_string_array": enumHeaderStringArray,
|
||||||
"enum_header_string": enumHeaderString?.rawValue
|
"enum_header_string": enumHeaderString?.rawValue
|
||||||
@ -556,7 +526,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -569,7 +538,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
@ -592,10 +560,9 @@ open class FakeAPI: APIBase {
|
|||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
- GET /fake/jsonFormData
|
- GET /fake/jsonFormData
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter param: (form) field1
|
- parameter param: (form) field1
|
||||||
- parameter param2: (form) field2
|
- parameter param2: (form) field2
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder<Void> {
|
open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder<Void> {
|
||||||
@ -611,7 +578,6 @@ open class FakeAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import RxSwift
|
import RxSwift
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class Fake_classname_tags123API: APIBase {
|
open class Fake_classname_tags123API: APIBase {
|
||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
- returns: Observable<Client>
|
- returns: Observable<Client>
|
||||||
*/
|
*/
|
||||||
@ -47,12 +44,11 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
/**
|
/**
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
- PATCH /fake_classname_test
|
- PATCH /fake_classname_test
|
||||||
|
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"client" : "aeiou"
|
"client" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter body: (body) client model
|
- parameter body: (body) client model
|
||||||
|
|
||||||
- returns: RequestBuilder<Client>
|
- returns: RequestBuilder<Client>
|
||||||
*/
|
*/
|
||||||
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
|
||||||
@ -62,7 +58,6 @@ open class Fake_classname_tags123API: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import RxSwift
|
import RxSwift
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class PetAPI: APIBase {
|
open class PetAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
@ -51,9 +48,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
||||||
@ -63,7 +58,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -71,7 +65,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -84,7 +77,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
@ -110,10 +102,8 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter petId: (path) Pet id to delete
|
- parameter petId: (path) Pet id to delete
|
||||||
- parameter apiKey: (header) (optional)
|
- parameter apiKey: (header) (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder<Void> {
|
open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -123,7 +113,6 @@ open class PetAPI: APIBase {
|
|||||||
let parameters: [String:Any]? = nil
|
let parameters: [String:Any]? = nil
|
||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
let nillableHeaders: [String: Any?] = [
|
let nillableHeaders: [String: Any?] = [
|
||||||
"api_key": apiKey
|
"api_key": apiKey
|
||||||
]
|
]
|
||||||
@ -145,7 +134,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -157,7 +145,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
- returns: Observable<[Pet]>
|
- returns: Observable<[Pet]>
|
||||||
*/
|
*/
|
||||||
@ -228,9 +215,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
} ]}]
|
} ]}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
|
|
||||||
- returns: RequestBuilder<[Pet]>
|
- returns: RequestBuilder<[Pet]>
|
||||||
*/
|
*/
|
||||||
open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> {
|
open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> {
|
||||||
@ -242,7 +227,6 @@ open class PetAPI: APIBase {
|
|||||||
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
||||||
"status": status
|
"status": status
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -251,7 +235,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -263,7 +246,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
- returns: Observable<[Pet]>
|
- returns: Observable<[Pet]>
|
||||||
*/
|
*/
|
||||||
@ -334,9 +316,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
} ]}]
|
} ]}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
|
|
||||||
- returns: RequestBuilder<[Pet]>
|
- returns: RequestBuilder<[Pet]>
|
||||||
*/
|
*/
|
||||||
open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> {
|
open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> {
|
||||||
@ -348,7 +328,6 @@ open class PetAPI: APIBase {
|
|||||||
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
url?.queryItems = APIHelper.mapValuesToQueryItems(values:[
|
||||||
"tags": tags
|
"tags": tags
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -357,7 +336,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -369,7 +347,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
- returns: Observable<Pet>
|
- returns: Observable<Pet>
|
||||||
*/
|
*/
|
||||||
@ -440,9 +417,7 @@ open class PetAPI: APIBase {
|
|||||||
} ],
|
} ],
|
||||||
"status" : "available"
|
"status" : "available"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to return
|
- parameter petId: (path) ID of pet to return
|
||||||
|
|
||||||
- returns: RequestBuilder<Pet>
|
- returns: RequestBuilder<Pet>
|
||||||
*/
|
*/
|
||||||
open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder<Pet> {
|
open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder<Pet> {
|
||||||
@ -453,7 +428,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -461,7 +435,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -473,7 +446,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
@ -498,9 +470,7 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter body: (body) Pet object that needs to be added to the store
|
- parameter body: (body) Pet object that needs to be added to the store
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder<Void> {
|
||||||
@ -510,7 +480,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -518,7 +487,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
@ -532,7 +500,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
@ -559,11 +526,9 @@ open class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be updated
|
- parameter petId: (path) ID of pet that needs to be updated
|
||||||
- parameter name: (form) Updated name of the pet (optional)
|
- parameter name: (form) Updated name of the pet (optional)
|
||||||
- parameter status: (form) Updated status of the pet (optional)
|
- parameter status: (form) Updated status of the pet (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder<Void> {
|
open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder<Void> {
|
||||||
@ -580,7 +545,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -588,7 +552,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
@ -602,7 +565,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
@ -634,11 +596,9 @@ open class PetAPI: APIBase {
|
|||||||
"type" : "aeiou",
|
"type" : "aeiou",
|
||||||
"message" : "aeiou"
|
"message" : "aeiou"
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet to update
|
- parameter petId: (path) ID of pet to update
|
||||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||||
- parameter file: (form) file to upload (optional)
|
- parameter file: (form) file to upload (optional)
|
||||||
|
|
||||||
- returns: RequestBuilder<ApiResponse>
|
- returns: RequestBuilder<ApiResponse>
|
||||||
*/
|
*/
|
||||||
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder<ApiResponse> {
|
||||||
@ -655,7 +615,6 @@ open class PetAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import RxSwift
|
import RxSwift
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class StoreAPI: APIBase {
|
open class StoreAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
@ -48,9 +45,8 @@ open class StoreAPI: APIBase {
|
|||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
- DELETE /store/order/{order_id}
|
- DELETE /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
|
||||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
|
||||||
|
|
||||||
|
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder<Void> {
|
open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder<Void> {
|
||||||
@ -61,7 +57,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -69,7 +64,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
|
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
open class func getInventory(completion: @escaping ((_ data: [String:Int32]?, _ error: ErrorResponse?) -> Void)) {
|
open class func getInventory(completion: @escaping ((_ data: [String:Int32]?, _ error: ErrorResponse?) -> Void)) {
|
||||||
@ -80,7 +74,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
|
|
||||||
- returns: Observable<[String:Int32]>
|
- returns: Observable<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
open class func getInventory() -> Observable<[String:Int32]> {
|
open class func getInventory() -> Observable<[String:Int32]> {
|
||||||
@ -107,7 +100,6 @@ open class StoreAPI: APIBase {
|
|||||||
- examples: [{contentType=application/json, example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 0
|
"key" : 0
|
||||||
}}]
|
}}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> {
|
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> {
|
||||||
@ -117,7 +109,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -125,7 +116,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -137,7 +127,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- returns: Observable<Order>
|
- returns: Observable<Order>
|
||||||
*/
|
*/
|
||||||
@ -159,39 +148,38 @@ open class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{order_id}
|
- GET /store/order/{order_id}
|
||||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
- returns: RequestBuilder<Order>
|
- returns: RequestBuilder<Order>
|
||||||
*/
|
*/
|
||||||
open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder<Order> {
|
open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder<Order> {
|
||||||
@ -202,7 +190,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -210,7 +197,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -222,7 +208,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- returns: Observable<Order>
|
- returns: Observable<Order>
|
||||||
*/
|
*/
|
||||||
@ -244,39 +229,38 @@ open class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<Order>
|
|
||||||
<id>123456789</id>
|
|
||||||
<petId>123456789</petId>
|
|
||||||
<quantity>123</quantity>
|
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
|
||||||
<status>aeiou</status>
|
|
||||||
<complete>true</complete>
|
|
||||||
</Order>}, {contentType=application/json, example={
|
|
||||||
"petId" : 6,
|
|
||||||
"quantity" : 1,
|
|
||||||
"id" : 0,
|
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"complete" : false,
|
|
||||||
"status" : "placed"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<Order>
|
||||||
|
<id>123456789</id>
|
||||||
|
<petId>123456789</petId>
|
||||||
|
<quantity>123</quantity>
|
||||||
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
|
<status>aeiou</status>
|
||||||
|
<complete>true</complete>
|
||||||
|
</Order>}, {contentType=application/json, example={
|
||||||
|
"petId" : 6,
|
||||||
|
"quantity" : 1,
|
||||||
|
"id" : 0,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||||
|
"complete" : false,
|
||||||
|
"status" : "placed"
|
||||||
|
}}]
|
||||||
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
- returns: RequestBuilder<Order>
|
- returns: RequestBuilder<Order>
|
||||||
*/
|
*/
|
||||||
open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder<Order> {
|
open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder<Order> {
|
||||||
@ -286,7 +270,6 @@ open class StoreAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -10,11 +10,9 @@ import Alamofire
|
|||||||
import RxSwift
|
import RxSwift
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
open class UserAPI: APIBase {
|
open class UserAPI: APIBase {
|
||||||
/**
|
/**
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
- parameter body: (body) Created user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -26,7 +24,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
- parameter body: (body) Created user object
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
@ -48,9 +45,8 @@ open class UserAPI: APIBase {
|
|||||||
Create user
|
Create user
|
||||||
- POST /user
|
- POST /user
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter body: (body) Created user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) Created user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUserWithRequestBuilder(body: User) -> RequestBuilder<Void> {
|
open class func createUserWithRequestBuilder(body: User) -> RequestBuilder<Void> {
|
||||||
@ -60,7 +56,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -68,7 +63,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -80,7 +74,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
@ -102,9 +95,8 @@ open class UserAPI: APIBase {
|
|||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
- POST /user/createWithArray
|
- POST /user/createWithArray
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) List of user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
||||||
@ -114,7 +106,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -122,7 +113,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -134,7 +124,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
- parameter body: (body) List of user object
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
@ -156,9 +145,8 @@ open class UserAPI: APIBase {
|
|||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
- POST /user/createWithList
|
- POST /user/createWithList
|
||||||
-
|
-
|
||||||
|
|
||||||
- parameter body: (body) List of user object
|
|
||||||
|
|
||||||
|
- parameter body: (body) List of user object
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder<Void> {
|
||||||
@ -168,7 +156,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
@ -176,7 +163,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Delete user
|
Delete user
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -188,7 +174,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Delete user
|
Delete user
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
@ -210,9 +195,8 @@ open class UserAPI: APIBase {
|
|||||||
Delete user
|
Delete user
|
||||||
- DELETE /user/{username}
|
- DELETE /user/{username}
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be deleted
|
|
||||||
|
|
||||||
|
- parameter username: (path) The name that needs to be deleted
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder<Void> {
|
open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder<Void> {
|
||||||
@ -223,7 +207,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -231,7 +214,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
@ -243,7 +225,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- returns: Observable<User>
|
- returns: Observable<User>
|
||||||
*/
|
*/
|
||||||
@ -265,47 +246,46 @@ open class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/xml, example=<User>
|
|
||||||
<id>123456789</id>
|
|
||||||
<username>aeiou</username>
|
|
||||||
<firstName>aeiou</firstName>
|
|
||||||
<lastName>aeiou</lastName>
|
|
||||||
<email>aeiou</email>
|
|
||||||
<password>aeiou</password>
|
|
||||||
<phone>aeiou</phone>
|
|
||||||
<userStatus>123</userStatus>
|
|
||||||
</User>}, {contentType=application/json, example={
|
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 0,
|
|
||||||
"email" : "aeiou",
|
|
||||||
"username" : "aeiou"
|
|
||||||
}}]
|
|
||||||
- examples: [{contentType=application/xml, example=<User>
|
|
||||||
<id>123456789</id>
|
|
||||||
<username>aeiou</username>
|
|
||||||
<firstName>aeiou</firstName>
|
|
||||||
<lastName>aeiou</lastName>
|
|
||||||
<email>aeiou</email>
|
|
||||||
<password>aeiou</password>
|
|
||||||
<phone>aeiou</phone>
|
|
||||||
<userStatus>123</userStatus>
|
|
||||||
</User>}, {contentType=application/json, example={
|
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 6,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 0,
|
|
||||||
"email" : "aeiou",
|
|
||||||
"username" : "aeiou"
|
|
||||||
}}]
|
|
||||||
|
|
||||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
|
||||||
|
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
|
<id>123456789</id>
|
||||||
|
<username>aeiou</username>
|
||||||
|
<firstName>aeiou</firstName>
|
||||||
|
<lastName>aeiou</lastName>
|
||||||
|
<email>aeiou</email>
|
||||||
|
<password>aeiou</password>
|
||||||
|
<phone>aeiou</phone>
|
||||||
|
<userStatus>123</userStatus>
|
||||||
|
</User>}, {contentType=application/json, example={
|
||||||
|
"firstName" : "aeiou",
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- examples: [{contentType=application/xml, example=<User>
|
||||||
|
<id>123456789</id>
|
||||||
|
<username>aeiou</username>
|
||||||
|
<firstName>aeiou</firstName>
|
||||||
|
<lastName>aeiou</lastName>
|
||||||
|
<email>aeiou</email>
|
||||||
|
<password>aeiou</password>
|
||||||
|
<phone>aeiou</phone>
|
||||||
|
<userStatus>123</userStatus>
|
||||||
|
</User>}, {contentType=application/json, example={
|
||||||
|
"firstName" : "aeiou",
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 6,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 0,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
|
}}]
|
||||||
|
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||||
- returns: RequestBuilder<User>
|
- returns: RequestBuilder<User>
|
||||||
*/
|
*/
|
||||||
open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder<User> {
|
open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder<User> {
|
||||||
@ -316,7 +296,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -324,7 +303,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -337,7 +315,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
- returns: Observable<String>
|
- returns: Observable<String>
|
||||||
@ -360,14 +337,13 @@ open class UserAPI: APIBase {
|
|||||||
Logs user into the system
|
Logs user into the system
|
||||||
- GET /user/login
|
- GET /user/login
|
||||||
-
|
-
|
||||||
|
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
|
|
||||||
- returns: RequestBuilder<String>
|
- returns: RequestBuilder<String>
|
||||||
*/
|
*/
|
||||||
open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder<String> {
|
open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder<String> {
|
||||||
@ -380,7 +356,6 @@ open class UserAPI: APIBase {
|
|||||||
"username": username,
|
"username": username,
|
||||||
"password": password
|
"password": password
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<String>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
@ -389,7 +364,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
open class func logoutUser(completion: @escaping ((_ error: ErrorResponse?) -> Void)) {
|
open class func logoutUser(completion: @escaping ((_ error: ErrorResponse?) -> Void)) {
|
||||||
@ -400,7 +374,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
*/
|
*/
|
||||||
open class func logoutUser() -> Observable<Void> {
|
open class func logoutUser() -> Observable<Void> {
|
||||||
@ -431,7 +404,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||||
@ -439,7 +411,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
@ -452,7 +423,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
- returns: Observable<Void>
|
- returns: Observable<Void>
|
||||||
@ -475,10 +445,9 @@ open class UserAPI: APIBase {
|
|||||||
Updated user
|
Updated user
|
||||||
- PUT /user/{username}
|
- PUT /user/{username}
|
||||||
- This can only be done by the logged in user.
|
- This can only be done by the logged in user.
|
||||||
|
|
||||||
- parameter username: (path) name that need to be deleted
|
- parameter username: (path) name that need to be deleted
|
||||||
- parameter body: (body) Updated user object
|
- parameter body: (body) Updated user object
|
||||||
|
|
||||||
- returns: RequestBuilder<Void>
|
- returns: RequestBuilder<Void>
|
||||||
*/
|
*/
|
||||||
open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder<Void> {
|
open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder<Void> {
|
||||||
@ -489,7 +458,6 @@ open class UserAPI: APIBase {
|
|||||||
|
|
||||||
let url = NSURLComponents(string: URLString)
|
let url = NSURLComponents(string: URLString)
|
||||||
|
|
||||||
|
|
||||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||||
|
|
||||||
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
|
||||||
|
@ -249,7 +249,7 @@ class Decoders {
|
|||||||
} else {
|
} else {
|
||||||
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ISO date", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decoder for AdditionalPropertiesClass
|
// Decoder for AdditionalPropertiesClass
|
||||||
Decoders.addDecoder(clazz: AdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<AdditionalPropertiesClass> in
|
Decoders.addDecoder(clazz: AdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<AdditionalPropertiesClass> in
|
||||||
@ -272,8 +272,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "AdditionalPropertiesClass", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "AdditionalPropertiesClass", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Animal
|
// Decoder for Animal
|
||||||
Decoders.addDecoder(clazz: Animal.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Animal> in
|
Decoders.addDecoder(clazz: Animal.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Animal> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -299,11 +297,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Animal", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Animal", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ApiResponse
|
// Decoder for ApiResponse
|
||||||
Decoders.addDecoder(clazz: ApiResponse.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ApiResponse> in
|
Decoders.addDecoder(clazz: ApiResponse.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ApiResponse> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -331,8 +324,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ApiResponse", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ApiResponse", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayOfArrayOfNumberOnly
|
// Decoder for ArrayOfArrayOfNumberOnly
|
||||||
Decoders.addDecoder(clazz: ArrayOfArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfArrayOfNumberOnly> in
|
Decoders.addDecoder(clazz: ArrayOfArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfArrayOfNumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -348,8 +339,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayOfArrayOfNumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayOfArrayOfNumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayOfNumberOnly
|
// Decoder for ArrayOfNumberOnly
|
||||||
Decoders.addDecoder(clazz: ArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfNumberOnly> in
|
Decoders.addDecoder(clazz: ArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayOfNumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -365,8 +354,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayOfNumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayOfNumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ArrayTest
|
// Decoder for ArrayTest
|
||||||
Decoders.addDecoder(clazz: ArrayTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayTest> in
|
Decoders.addDecoder(clazz: ArrayTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ArrayTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -394,8 +381,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ArrayTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ArrayTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Capitalization
|
// Decoder for Capitalization
|
||||||
Decoders.addDecoder(clazz: Capitalization.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Capitalization> in
|
Decoders.addDecoder(clazz: Capitalization.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Capitalization> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -441,8 +426,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Capitalization", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Capitalization", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Category
|
// Decoder for Category
|
||||||
Decoders.addDecoder(clazz: Category.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Category> in
|
Decoders.addDecoder(clazz: Category.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Category> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -464,8 +447,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Category", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Category", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ClassModel
|
// Decoder for ClassModel
|
||||||
Decoders.addDecoder(clazz: ClassModel.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ClassModel> in
|
Decoders.addDecoder(clazz: ClassModel.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ClassModel> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -481,8 +462,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ClassModel", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ClassModel", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Client
|
// Decoder for Client
|
||||||
Decoders.addDecoder(clazz: Client.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Client> in
|
Decoders.addDecoder(clazz: Client.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Client> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -498,8 +477,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Client", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Client", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumArrays
|
// Decoder for EnumArrays
|
||||||
Decoders.addDecoder(clazz: EnumArrays.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumArrays> in
|
Decoders.addDecoder(clazz: EnumArrays.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumArrays> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -521,15 +498,11 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "EnumArrays", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "EnumArrays", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumClass
|
// Decoder for EnumClass
|
||||||
Decoders.addDecoder(clazz: EnumClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumClass> in
|
Decoders.addDecoder(clazz: EnumClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumClass> in
|
||||||
//TODO: I don't think we need this anymore
|
//TODO: I don't think we need this anymore
|
||||||
return Decoders.decode(clazz: EnumClass.self, source: source, instance: instance)
|
return Decoders.decode(clazz: EnumClass.self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for EnumTest
|
// Decoder for EnumTest
|
||||||
Decoders.addDecoder(clazz: EnumTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumTest> in
|
Decoders.addDecoder(clazz: EnumTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<EnumTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -563,8 +536,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "EnumTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "EnumTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for FormatTest
|
// Decoder for FormatTest
|
||||||
Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<FormatTest> in
|
Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<FormatTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -652,8 +623,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "FormatTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "FormatTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for HasOnlyReadOnly
|
// Decoder for HasOnlyReadOnly
|
||||||
Decoders.addDecoder(clazz: HasOnlyReadOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<HasOnlyReadOnly> in
|
Decoders.addDecoder(clazz: HasOnlyReadOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<HasOnlyReadOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -675,8 +644,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "HasOnlyReadOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "HasOnlyReadOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for List
|
// Decoder for List
|
||||||
Decoders.addDecoder(clazz: List.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<List> in
|
Decoders.addDecoder(clazz: List.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<List> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -692,8 +659,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "List", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "List", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for MapTest
|
// Decoder for MapTest
|
||||||
Decoders.addDecoder(clazz: MapTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MapTest> in
|
Decoders.addDecoder(clazz: MapTest.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MapTest> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -715,8 +680,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "MapTest", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "MapTest", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
|
||||||
Decoders.addDecoder(clazz: MixedPropertiesAndAdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MixedPropertiesAndAdditionalPropertiesClass> in
|
Decoders.addDecoder(clazz: MixedPropertiesAndAdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<MixedPropertiesAndAdditionalPropertiesClass> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -744,8 +707,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "MixedPropertiesAndAdditionalPropertiesClass", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "MixedPropertiesAndAdditionalPropertiesClass", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Model200Response
|
// Decoder for Model200Response
|
||||||
Decoders.addDecoder(clazz: Model200Response.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Model200Response> in
|
Decoders.addDecoder(clazz: Model200Response.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Model200Response> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -767,8 +728,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Model200Response", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Model200Response", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Name
|
// Decoder for Name
|
||||||
Decoders.addDecoder(clazz: Name.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Name> in
|
Decoders.addDecoder(clazz: Name.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Name> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -802,8 +761,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Name", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Name", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for NumberOnly
|
// Decoder for NumberOnly
|
||||||
Decoders.addDecoder(clazz: NumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<NumberOnly> in
|
Decoders.addDecoder(clazz: NumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<NumberOnly> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -819,8 +776,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "NumberOnly", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "NumberOnly", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Order
|
// Decoder for Order
|
||||||
Decoders.addDecoder(clazz: Order.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Order> in
|
Decoders.addDecoder(clazz: Order.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Order> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -866,8 +821,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Order", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Order", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterBoolean
|
// Decoder for OuterBoolean
|
||||||
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
Decoders.addDecoder(clazz: OuterBoolean.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterBoolean> in
|
||||||
if let source = source as? Bool {
|
if let source = source as? Bool {
|
||||||
@ -876,8 +829,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterBoolean", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterComposite
|
// Decoder for OuterComposite
|
||||||
Decoders.addDecoder(clazz: OuterComposite.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterComposite> in
|
Decoders.addDecoder(clazz: OuterComposite.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterComposite> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -905,15 +856,11 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "OuterComposite", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "OuterComposite", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterEnum
|
// Decoder for OuterEnum
|
||||||
Decoders.addDecoder(clazz: OuterEnum.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterEnum> in
|
Decoders.addDecoder(clazz: OuterEnum.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterEnum> in
|
||||||
//TODO: I don't think we need this anymore
|
//TODO: I don't think we need this anymore
|
||||||
return Decoders.decode(clazz: OuterEnum.self, source: source, instance: instance)
|
return Decoders.decode(clazz: OuterEnum.self, source: source, instance: instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterNumber
|
// Decoder for OuterNumber
|
||||||
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
Decoders.addDecoder(clazz: OuterNumber.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterNumber> in
|
||||||
if let source = source as? Double {
|
if let source = source as? Double {
|
||||||
@ -922,8 +869,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterNumber", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for OuterString
|
// Decoder for OuterString
|
||||||
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
Decoders.addDecoder(clazz: OuterString.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<OuterString> in
|
||||||
if let source = source as? String {
|
if let source = source as? String {
|
||||||
@ -932,8 +877,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Typealias OuterString", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Pet
|
// Decoder for Pet
|
||||||
Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Pet> in
|
Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Pet> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -979,8 +922,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Pet", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Pet", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for ReadOnlyFirst
|
// Decoder for ReadOnlyFirst
|
||||||
Decoders.addDecoder(clazz: ReadOnlyFirst.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ReadOnlyFirst> in
|
Decoders.addDecoder(clazz: ReadOnlyFirst.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<ReadOnlyFirst> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1002,8 +943,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "ReadOnlyFirst", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "ReadOnlyFirst", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Return
|
// Decoder for Return
|
||||||
Decoders.addDecoder(clazz: Return.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Return> in
|
Decoders.addDecoder(clazz: Return.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Return> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1019,8 +958,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Return", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Return", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for SpecialModelName
|
// Decoder for SpecialModelName
|
||||||
Decoders.addDecoder(clazz: SpecialModelName.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<SpecialModelName> in
|
Decoders.addDecoder(clazz: SpecialModelName.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<SpecialModelName> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1036,8 +973,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "SpecialModelName", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "SpecialModelName", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Tag
|
// Decoder for Tag
|
||||||
Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Tag> in
|
Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Tag> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1059,8 +994,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Tag", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Tag", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for User
|
// Decoder for User
|
||||||
Decoders.addDecoder(clazz: User.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<User> in
|
Decoders.addDecoder(clazz: User.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<User> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1118,8 +1051,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "User", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "User", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Cat
|
// Decoder for Cat
|
||||||
Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Cat> in
|
Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Cat> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
@ -1150,8 +1081,6 @@ class Decoders {
|
|||||||
return .failure(.typeMismatch(expected: "Cat", actual: "\(source)"))
|
return .failure(.typeMismatch(expected: "Cat", actual: "\(source)"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Decoder for Dog
|
// Decoder for Dog
|
||||||
Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Dog> in
|
Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Dog> in
|
||||||
if let sourceDictionary = source as? [AnyHashable: Any] {
|
if let sourceDictionary = source as? [AnyHashable: Any] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user