Skip to content

Commit 0587e35

Browse files
committed
[swift6][client] make PromiseKit as deprecated
1 parent e64d132 commit 0587e35

13 files changed

Lines changed: 71 additions & 71 deletions

File tree

modules/openapi-generator/src/main/resources/swift6/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ extension {{projectName}}API {
9494
- parameter apiConfiguration: The configuration for the http request.{{/apiStaticMethod}}
9595
- returns: Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
9696
*/
97-
@available(*, deprecated, message: "{{#isDeprecated}}This operation is deprecated. | {{/isDeprecated}}We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
97+
@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")
9898
{{#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}}> {
9999
let deferred = Promise<{{{returnType}}}{{#returnType}}{{#isResponseOptional}}?{{/isResponseOptional}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending()
100100
{{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#apiStaticMethod}}{{#hasParams}}, {{/hasParams}}apiConfiguration: apiConfiguration{{/apiStaticMethod}}).execute { result in

samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ open class AnotherFakeAPI {
4242
- parameter body: (body) client model
4343
- returns: Promise<Client>
4444
*/
45-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
45+
@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")
4646
open func call123testSpecialTags(body: Client) -> Promise<Client> {
4747
let deferred = Promise<Client>.pending()
4848
call123testSpecialTagsWithRequestBuilder(body: body).execute { result in

samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/APIs/FakeAPI.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ open class FakeAPI {
4040
- parameter body: (body) Input boolean as post body (optional)
4141
- returns: Promise<Bool>
4242
*/
43-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
43+
@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")
4444
open func fakeOuterBooleanSerialize(body: Bool? = nil) -> Promise<Bool> {
4545
let deferred = Promise<Bool>.pending()
4646
fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { result in
@@ -180,7 +180,7 @@ open class FakeAPI {
180180
- parameter body: (body) Input composite as post body (optional)
181181
- returns: Promise<OuterComposite>
182182
*/
183-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
183+
@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")
184184
open func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> Promise<OuterComposite> {
185185
let deferred = Promise<OuterComposite>.pending()
186186
fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { result in
@@ -320,7 +320,7 @@ open class FakeAPI {
320320
- parameter body: (body) Input number as post body (optional)
321321
- returns: Promise<Double>
322322
*/
323-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
323+
@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")
324324
open func fakeOuterNumberSerialize(body: Double? = nil) -> Promise<Double> {
325325
let deferred = Promise<Double>.pending()
326326
fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { result in
@@ -460,7 +460,7 @@ open class FakeAPI {
460460
- parameter body: (body) Input string as post body (optional)
461461
- returns: Promise<String>
462462
*/
463-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
463+
@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")
464464
open func fakeOuterStringSerialize(body: String? = nil) -> Promise<String> {
465465
let deferred = Promise<String>.pending()
466466
fakeOuterStringSerializeWithRequestBuilder(body: body).execute { result in
@@ -600,7 +600,7 @@ open class FakeAPI {
600600
- parameter body: (body)
601601
- returns: Promise<Void>
602602
*/
603-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
603+
@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")
604604
open func testBodyWithFileSchema(body: FileSchemaTestClass) -> Promise<Void> {
605605
let deferred = Promise<Void>.pending()
606606
testBodyWithFileSchemaWithRequestBuilder(body: body).execute { result in
@@ -742,7 +742,7 @@ open class FakeAPI {
742742
- parameter body: (body)
743743
- returns: Promise<Void>
744744
*/
745-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
745+
@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")
746746
open func testBodyWithQueryParams(query: String, body: User) -> Promise<Void> {
747747
let deferred = Promise<Void>.pending()
748748
testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { result in
@@ -891,7 +891,7 @@ open class FakeAPI {
891891
- parameter body: (body) client model
892892
- returns: Promise<Client>
893893
*/
894-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
894+
@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")
895895
open func testClientModel(body: Client) -> Promise<Client> {
896896
let deferred = Promise<Client>.pending()
897897
testClientModelWithRequestBuilder(body: body).execute { result in
@@ -1064,7 +1064,7 @@ open class FakeAPI {
10641064
- parameter callback: (form) None (optional)
10651065
- returns: Promise<Void>
10661066
*/
1067-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
1067+
@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")
10681068
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> {
10691069
let deferred = Promise<Void>.pending()
10701070
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
@@ -1378,7 +1378,7 @@ open class FakeAPI {
13781378
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg)
13791379
- returns: Promise<Void>
13801380
*/
1381-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
1381+
@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")
13821382
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> {
13831383
let deferred = Promise<Void>.pending()
13841384
testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { result in
@@ -1584,7 +1584,7 @@ open class FakeAPI {
15841584
- parameter int64Group: (query) Integer in group parameters (optional)
15851585
- returns: Promise<Void>
15861586
*/
1587-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
1587+
@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")
15881588
open func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise<Void> {
15891589
let deferred = Promise<Void>.pending()
15901590
testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { result in
@@ -1763,7 +1763,7 @@ open class FakeAPI {
17631763
- parameter param: (body) request body
17641764
- returns: Promise<Void>
17651765
*/
1766-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
1766+
@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")
17671767
open func testInlineAdditionalProperties(param: [String: String]) -> Promise<Void> {
17681768
let deferred = Promise<Void>.pending()
17691769
testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { result in
@@ -1911,7 +1911,7 @@ open class FakeAPI {
19111911
- parameter param2: (form) field2
19121912
- returns: Promise<Void>
19131913
*/
1914-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
1914+
@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")
19151915
open func testJsonFormData(param: String, param2: String) -> Promise<Void> {
19161916
let deferred = Promise<Void>.pending()
19171917
testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { result in

samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ open class FakeClassnameTags123API {
4242
- parameter body: (body) client model
4343
- returns: Promise<Client>
4444
*/
45-
@available(*, deprecated, message: "We are considering deprecating PromiseKit support in the Swift 6 generator. Feedback: https://github.com/OpenAPITools/openapi-generator/issues/22791")
45+
@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")
4646
open func testClassname(body: Client) -> Promise<Client> {
4747
let deferred = Promise<Client>.pending()
4848
testClassnameWithRequestBuilder(body: body).execute { result in

0 commit comments

Comments
 (0)