Skip to content
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

Fix OpenAPI link in broken Swift4/5 README templates #6035

Merged
merged 2 commits into from
Apr 24, 2020
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 @@ -5,7 +5,7 @@
{{/appDescriptionWithNewLines}}

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: {{appVersion}}
- Package version: {{packageVersion}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{/appDescriptionWithNewLines}}

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: {{appVersion}}
- Package version: {{packageVersion}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/nonPublicApi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/objcCompatible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/promisekitLibrary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/resultLibrary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/rxswiftLibrary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift4/unwrapRequired/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,13 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -568,7 +567,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
defaultConfigurationName = "";
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -63,6 +67,8 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ open class RequestBuilder<T> {
}
}

open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result<Response<T>, Error>) -> Void) { }
open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) { }

public func addHeader(name: String, value: String) -> Self {
if !value.isEmpty {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ open class CodableHelper {
set { self.customJSONEncoder = newValue }
}

open class func decode<T>(_ type: T.Type, from data: Data) -> Result<T, Error> where T: Decodable {
return Result { try self.jsonDecoder.decode(type, from: data) }
open class func decode<T>(_ type: T.Type, from data: Data) -> Swift.Result<T, Error> where T: Decodable {
return Swift.Result { try self.jsonDecoder.decode(type, from: data) }
}

open class func encode<T>(_ value: T) -> Result<Data, Error> where T: Encodable {
return Result { try self.jsonEncoder.encode(value) }
open class func encode<T>(_ value: T) -> Swift.Result<Data, Error> where T: Encodable {
return Swift.Result { try self.jsonEncoder.encode(value) }
}
}
2 changes: 1 addition & 1 deletion samples/client/petstore/swift5/alamofireLibrary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,13 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
TargetAttributes = {
};
};
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
compatibilityVersion = "Xcode 10.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -520,7 +519,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
defaultConfigurationName = "";
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -63,6 +67,8 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ open class RequestBuilder<T> {
}
}

open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result<Response<T>, Error>) -> Void) { }
open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) { }

public func addHeader(name: String, value: String) -> Self {
if !value.isEmpty {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ open class CodableHelper {
set { self.customJSONEncoder = newValue }
}

open class func decode<T>(_ type: T.Type, from data: Data) -> Result<T, Error> where T: Decodable {
return Result { try self.jsonDecoder.decode(type, from: data) }
open class func decode<T>(_ type: T.Type, from data: Data) -> Swift.Result<T, Error> where T: Decodable {
return Swift.Result { try self.jsonDecoder.decode(type, from: data) }
}

open class func encode<T>(_ value: T) -> Result<Data, Error> where T: Encodable {
return Result { try self.jsonEncoder.encode(value) }
open class func encode<T>(_ value: T) -> Swift.Result<Data, Error> where T: Encodable {
return Swift.Result { try self.jsonEncoder.encode(value) }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
return modifiedRequest
}

override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result<Response<T>, Error>) -> Void) {
override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {
let urlSessionId: String = UUID().uuidString
// Create a new manager for each request to customize its request header
let urlSession = createURLSession()
Expand Down Expand Up @@ -180,7 +180,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {

}

fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result<Response<T>, Error>) -> Void) {
fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {

if let error = error {
completion(.failure(ErrorResponse.error(-1, data, error)))
Expand Down Expand Up @@ -312,7 +312,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
}

open class URLSessionDecodableRequestBuilder<T: Decodable>: URLSessionRequestBuilder<T> {
override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result<Response<T>, Error>) -> Void) {
override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result<Response<T>, Error>) -> Void) {

if let error = error {
completion(.failure(ErrorResponse.error(-1, data, error)))
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift5/combineLibrary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client.
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.

- API version: 1.0.0
- Package version:
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/swift5/default/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "PetstoreClient",
targets: ["PetstoreClient"]),
targets: ["PetstoreClient"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
Expand All @@ -26,6 +26,6 @@ let package = Package(
name: "PetstoreClient",
dependencies: [],
path: "PetstoreClient/Classes"
),
)
]
)
Loading