Skip to content
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 @@ -491,6 +491,9 @@ public void processOpts() {
additionalProperties.put(RESPONSE_AS, responseAs);
if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_PROMISE_KIT)) {
additionalProperties.put("usePromiseKit", true);
LOGGER.warn("NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. " +
"If you are still using it, please share your use case here: " +
"https://github.com/OpenAPITools/openapi-generator/issues/22791");
}
if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_RX_SWIFT)) {
additionalProperties.put("useRxSwift", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ extension {{projectName}}API {
- parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}}
- returns: Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
*/
{{#isDeprecated}}
@available(*, deprecated, message: "This operation is deprecated.")
{{/isDeprecated}}
@available(*, deprecated, message: "{{#isDeprecated}}This operation is deprecated. | {{/isDeprecated}}NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} {{#apiStaticMethod}}class {{/apiStaticMethod}}func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}[{{enumName}}_{{operationId}}]{{/isContainer}}{{^isContainer}}{{enumName}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: {{projectName}}APIConfiguration = {{projectName}}APIConfiguration.shared{{/apiStaticMethod}}) -> Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
let deferred = Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending()
{{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ open class AnotherFakeAPI {
- parameter body: (body) client model
- returns: Promise<Client>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func call123testSpecialTags(body: Client) -> Promise<Client> {
let deferred = Promise<Client>.pending()
call123testSpecialTagsWithRequestBuilder(body: body).execute { result in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ open class FakeAPI {
- parameter body: (body) Input boolean as post body (optional)
- returns: Promise<Bool>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func fakeOuterBooleanSerialize(body: Bool? = nil) -> Promise<Bool> {
let deferred = Promise<Bool>.pending()
fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -179,6 +180,7 @@ open class FakeAPI {
- parameter body: (body) Input composite as post body (optional)
- returns: Promise<OuterComposite>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> Promise<OuterComposite> {
let deferred = Promise<OuterComposite>.pending()
fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -318,6 +320,7 @@ open class FakeAPI {
- parameter body: (body) Input number as post body (optional)
- returns: Promise<Double>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func fakeOuterNumberSerialize(body: Double? = nil) -> Promise<Double> {
let deferred = Promise<Double>.pending()
fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -457,6 +460,7 @@ open class FakeAPI {
- parameter body: (body) Input string as post body (optional)
- returns: Promise<String>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func fakeOuterStringSerialize(body: String? = nil) -> Promise<String> {
let deferred = Promise<String>.pending()
fakeOuterStringSerializeWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -596,6 +600,7 @@ open class FakeAPI {
- parameter body: (body)
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testBodyWithFileSchema(body: FileSchemaTestClass) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testBodyWithFileSchemaWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -737,6 +742,7 @@ open class FakeAPI {
- parameter body: (body)
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testBodyWithQueryParams(query: String, body: User) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { result in
Expand Down Expand Up @@ -885,6 +891,7 @@ open class FakeAPI {
- parameter body: (body) client model
- returns: Promise<Client>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testClientModel(body: Client) -> Promise<Client> {
let deferred = Promise<Client>.pending()
testClientModelWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -1057,6 +1064,7 @@ open class FakeAPI {
- parameter callback: (form) None (optional)
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: Data? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { result in
Expand Down Expand Up @@ -1370,6 +1378,7 @@ open class FakeAPI {
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg)
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testEnumParameters(enumHeaderStringArray: [EnumHeaderStringArray_testEnumParameters]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [EnumQueryStringArray_testEnumParameters]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [EnumFormStringArray_testEnumParameters]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { result in
Expand Down Expand Up @@ -1575,6 +1584,7 @@ open class FakeAPI {
- parameter int64Group: (query) Integer in group parameters (optional)
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { result in
Expand Down Expand Up @@ -1753,6 +1763,7 @@ open class FakeAPI {
- parameter param: (body) request body
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testInlineAdditionalProperties(param: [String: String]) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { result in
Expand Down Expand Up @@ -1900,6 +1911,7 @@ open class FakeAPI {
- parameter param2: (form) field2
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testJsonFormData(param: String, param2: String) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { result in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ open class FakeClassnameTags123API {
- parameter body: (body) client model
- returns: Promise<Client>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func testClassname(body: Client) -> Promise<Client> {
let deferred = Promise<Client>.pending()
testClassnameWithRequestBuilder(body: body).execute { result in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ open class PetAPI {
- parameter body: (body) Pet object that needs to be added to the store
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func addPet(body: Pet) -> Promise<Void> {
let deferred = Promise<Void>.pending()
addPetWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -195,6 +196,7 @@ open class PetAPI {
- parameter apiKey: (header) (optional)
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func deletePet(petId: Int64, apiKey: String? = nil) -> Promise<Void> {
let deferred = Promise<Void>.pending()
deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { result in
Expand Down Expand Up @@ -360,6 +362,7 @@ open class PetAPI {
- parameter status: (query) Status values that need to be considered for filter
- returns: Promise<[Pet]>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func findPetsByStatus(status: [Status_findPetsByStatus]) -> Promise<[Pet]> {
let deferred = Promise<[Pet]>.pending()
findPetsByStatusWithRequestBuilder(status: status).execute { result in
Expand Down Expand Up @@ -513,7 +516,7 @@ open class PetAPI {
- parameter tags: (query) Tags to filter by
- returns: Promise<[Pet]>
*/
@available(*, deprecated, message: "This operation is deprecated.")
@available(*, deprecated, message: "This operation is deprecated. | NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func findPetsByTags(tags: [String]) -> Promise<[Pet]> {
let deferred = Promise<[Pet]>.pending()
findPetsByTagsWithRequestBuilder(tags: tags).execute { result in
Expand Down Expand Up @@ -671,6 +674,7 @@ open class PetAPI {
- parameter petId: (path) ID of pet to return
- returns: Promise<Pet>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func getPetById(petId: Int64) -> Promise<Pet> {
let deferred = Promise<Pet>.pending()
getPetByIdWithRequestBuilder(petId: petId).execute { result in
Expand Down Expand Up @@ -823,6 +827,7 @@ open class PetAPI {
- parameter body: (body) Pet object that needs to be added to the store
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func updatePet(body: Pet) -> Promise<Void> {
let deferred = Promise<Void>.pending()
updatePetWithRequestBuilder(body: body).execute { result in
Expand Down Expand Up @@ -975,6 +980,7 @@ open class PetAPI {
- parameter status: (form) Updated status of the pet (optional)
- returns: Promise<Void>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> Promise<Void> {
let deferred = Promise<Void>.pending()
updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { result in
Expand Down Expand Up @@ -1146,6 +1152,7 @@ open class PetAPI {
- parameter file: (form) file to upload (optional)
- returns: Promise<ApiResponse>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: Data? = nil) -> Promise<ApiResponse> {
let deferred = Promise<ApiResponse>.pending()
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { result in
Expand Down Expand Up @@ -1317,6 +1324,7 @@ open class PetAPI {
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
- returns: Promise<ApiResponse>
*/
@available(*, deprecated, message: "NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. If you are still using it, please share your use case here: https://github.com/OpenAPITools/openapi-generator/issues/22791")
open func uploadFileWithRequiredFile(petId: Int64, requiredFile: Data, additionalMetadata: String? = nil) -> Promise<ApiResponse> {
let deferred = Promise<ApiResponse>.pending()
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { result in
Expand Down
Loading
Loading