If in your operations you have something as follows:
{
"name": "param1",
"in": "query",
"required": false,
"type": "string",
"enum": [
"true",
"false"
]
},
{
"name": "param2",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MyType"
}
The generated swift will contain something of the following form:
public class func myOperationWithRequestBuilder(param2: MyType, param1: String?) -> RequestBuilder<> {
var path = ...
let URLString = SwaggerClientAPI.basePath + path
let parameters = param2.encodeToJSON() as? [String:AnyObject]
let requestBuilder: RequestBuilder<>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "PUT", URLString: URLString, parameters: parameters, isBody: false)
ignoring the query parameter (param1) and passing isBody false to the init.
The root limitation is that Alamofire either send parameters as query parameters or body but can't do both.
If in your operations you have something as follows:
The generated swift will contain something of the following form:
ignoring the query parameter (param1) and passing isBody false to the init.
The root limitation is that Alamofire either send parameters as query parameters or body but can't do both.