Join 5 optional strings with a joiner character
I do it a bit more elegantly I believe. First, this extension function is pretty useful.

extension Array {
    static func filterNils(array: [T?]) -&gt; [T] {
        return array.filter { $0 != nil }.map { $0! }
    }
}


An example of my request models.

class PostRequest: BaseRequest {
    var startIndex: Int?
    var fetchCount: Int?
    var programID: String?
    var userID: String?
    let postType: FeedPostType

    var userPostFilter: String? {
        switch postType {
        case .User:
            return "all"
        default:
            return nil
        }
    }

    init(postType: FeedPostType) {
        self.postType = postType
    }

    override var path: String {
        let basePath = "/posts"
        var arguments: [String] = Array.filterNils([basePath,postType.rawValue,programID,userID,userPostFilter,startIndex?.toString(),fetchCount?.toString()])
        return "/".join(arguments)
    }
}


toString is also an extension on Int

extension Int {
    func toString() -&gt; String {
        return String(self)
    }
}