forked from loafle/openapi-generator-original
[Swift4] Add throw to reserved words (#6952)
* * Added `throw` to Swift4 Reserved words. * * Regenerating Swift4 Petstore project
This commit is contained in:
parent
4e482eef17
commit
970de01bdf
@ -150,7 +150,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
|
||||
"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")
|
||||
);
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2.3.0-SNAPSHOT
|
||||
unset
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user