Description
There's an issue with the url path generated for one of the methods.
Swagger-codegen version
public class func accountPaymentTokensWithRequestBuilder(accountId accountId: Int32) -> RequestBuilder<[PaymentToken]> {
var path = "/accounts/{account-id}/payment-tokens"
path = path.stringByReplacingOccurrencesOfString("{accountId}", withString: "\(accountId)", options: .LiteralSearch, range: nil)
let URLString = SwaggerClientAPI.basePath + path
Swagger declaration file content or url
"parameters": [
{
"name": "account-id",
"in": "path",
"required": true,
"type": "integer",
"format": "int32"
},
Steps to reproduce
Generate client-side Swift code from http://editor.swagger.io/#/
Suggest a Fix
In the method stringByReplacingOccurrencesOfString "{accountId}" should be the the value name from the JSON string account-id instead it pulls the value from the variable name accountId
The whole line should be path = path.stringByReplacingOccurrencesOfString("{account-id}", withString: "\(accountId)", options: .LiteralSearch, range: nil)
Or better yet, include the variable directly in the url and ditch the second line completley
var path = "/accounts/\(accountId)/payment-tokens"
Description
There's an issue with the url path generated for one of the methods.
Swagger-codegen version
Swagger declaration file content or url
Steps to reproduce
Generate client-side Swift code from
http://editor.swagger.io/#/Suggest a Fix
In the method
stringByReplacingOccurrencesOfString"{accountId}"should be the the value name from the JSON stringaccount-idinstead it pulls the value from the variable nameaccountIdThe whole line should be
path = path.stringByReplacingOccurrencesOfString("{account-id}", withString: "\(accountId)", options: .LiteralSearch, range: nil)Or better yet, include the variable directly in the url and ditch the second line completley
var path = "/accounts/\(accountId)/payment-tokens"