Skip to content

[Swift4] Add throw to reserved words #6952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public Swift4Codegen() {
"FILE", "mutating", "protocol", "switch", "FUNCTION", "none", "public",
"where", "LINE", "nonmutating", "static", "while", "optional", "struct",
"override", "subscript", "postfix", "typealias", "precedence", "var",
"prefix", "Protocol", "required", "right", "set", "Type", "unowned", "weak",
"prefix", "Protocol", "required", "right", "set", "throw", "Type", "unowned", "weak",
"Data", "Codable", "Encodable", "Decodable")
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0-SNAPSHOT
unset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why this is unset...

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//
// FakeClassnameTags123API.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation
import Alamofire



open class FakeClassnameTags123API {
/**
To test class name in snake case

- parameter body: (body) client model
- parameter completion: completion handler to receive the data and the error objects
*/
open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) {
testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error);
}
}


/**
To test class name in snake case
- PATCH /fake_classname_test
- API Key:
- type: apiKey api_key_query (QUERY)
- name: api_key_query
- examples: [{contentType=application/json, example={
"client" : "client"
}}]

- parameter body: (body) client model

- returns: RequestBuilder<Client>
*/
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
let path = "/fake_classname_test"
let URLString = PetstoreClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)

let url = NSURLComponents(string: URLString)


let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()

return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}

}
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/default/git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
Expand Down