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

4brunu feature/swift6 #19640

Closed
wants to merge 15 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ Here is a list of template creators:
* Swift 3: @hexelon
* Swift 4: @ehyche
* Swift 5: @4brunu
* Swift 6: @4brunu
* Swift Combine: @dydus0x14
* TypeScript (Angular1): @mhardorf
* TypeScript (Angular2): @roni-frantchi
Expand Down
12 changes: 12 additions & 0 deletions bin/configs/swift6-alamofireLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/alamofireLibrary
library: alamofire
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
useCustomDateWithoutTime: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
10 changes: 10 additions & 0 deletions bin/configs/swift6-any-codable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/anycodableLibrary
inputSpec: modules/openapi-generator/src/test/resources/3_0/any_codable.yaml
modelNamePrefix: Prefix
modelNameSuffix: Suffix
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
12 changes: 12 additions & 0 deletions bin/configs/swift6-api-non-static-method.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/apiNonStaticMethod
library: alamofire
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
additionalProperties:
responseAs: AsyncAwait,Combine,Result,PromiseKit,RxSwift
apiStaticMethod: false
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
11 changes: 11 additions & 0 deletions bin/configs/swift6-asyncAwaitLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/asyncAwaitLibrary
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
responseAs: AsyncAwait
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
11 changes: 11 additions & 0 deletions bin/configs/swift6-combineDeferredLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/combineDeferredLibrary
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
responseAs: Combine
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
12 changes: 12 additions & 0 deletions bin/configs/swift6-combineLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/combineLibrary
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
responseAs: Combine
combineDeferred: false
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
12 changes: 12 additions & 0 deletions bin/configs/swift6-default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/default
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
enumNameMappings:
delivered: shipped
10 changes: 10 additions & 0 deletions bin/configs/swift6-deprecated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/deprecated
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-deprecated-fields.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
12 changes: 12 additions & 0 deletions bin/configs/swift6-frozenEnums.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/frozenEnums
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
sortParamsByRequiredFlag: false
enumUnknownDefaultCase: true
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
21 changes: 21 additions & 0 deletions bin/configs/swift6-nonPublicApi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/nonPublicApi
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
sortParamsByRequiredFlag: false
nonPublicApi: true
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
nameMappings:
_type: underscoreType
type_: typeWithUnderscore
-type: dashType
parameterNameMappings:
_type: underscoreType
type_: typeWithUnderscore
-type: dashType

11 changes: 11 additions & 0 deletions bin/configs/swift6-objcCompatible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/objcCompatible
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
objcCompatible: true
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
10 changes: 10 additions & 0 deletions bin/configs/swift6-oneOf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/oneOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
11 changes: 11 additions & 0 deletions bin/configs/swift6-promisekitLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/promisekitLibrary
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
responseAs: PromiseKit
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
11 changes: 11 additions & 0 deletions bin/configs/swift6-readonlyProperties.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/readonlyProperties
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
readonlyProperties: true
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
11 changes: 11 additions & 0 deletions bin/configs/swift6-resultLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/resultLibrary
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
responseAs: Result
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
13 changes: 13 additions & 0 deletions bin/configs/swift6-rxswiftLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/rxswiftLibrary
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
responseAs: RxSwift
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
useBacktickEscapes: true
generateModelAdditionalProperties: false
14 changes: 14 additions & 0 deletions bin/configs/swift6-urlsessionLibrary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/urlsessionLibrary
library: urlsession
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
useSPMFileStructure: true
useClasses: true
swiftUseApiNamespace: true
10 changes: 10 additions & 0 deletions bin/configs/swift6-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/validation
inputSpec: modules/openapi-generator/src/test/resources/3_0/validation.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
12 changes: 12 additions & 0 deletions bin/configs/swift6-vapor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/vaporLibrary
library: vapor
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
projectName: PetstoreClient
useSPMFileStructure: true
useClasses: true
useBacktickEscapes: true
mapFileBinaryToData: true
11 changes: 11 additions & 0 deletions bin/configs/swift6-x-swift-hashable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: swift6
outputDir: samples/client/petstore/swift6/x-swift-hashable
inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/swift6
generateAliasAsModel: true
additionalProperties:
podAuthors: ""
podSummary: PetstoreClient
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
hashableModels: false
11 changes: 10 additions & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ workflows:
#!/usr/bin/env bash

sudo gem install cocoapods
- [email protected]:
title: Run Swift6 tests
inputs:
- content: |
#!/usr/bin/env bash

set -e

./samples/client/petstore/swift6/swift6_test_all.sh
- [email protected]:
title: Run Swift5 tests
inputs:
Expand All @@ -39,4 +48,4 @@ workflows:

meta:
bitrise.io:
stack: osx-xcode-14.3.x-ventura
stack: osx-xcode-16.0.x
1 change: 1 addition & 0 deletions docs/generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The following generators are available:
* [scalaz](generators/scalaz.md)
* [swift-combine](generators/swift-combine.md)
* [swift5](generators/swift5.md)
* [swift6 (experimental)](generators/swift6.md)
* [typescript (experimental)](generators/typescript.md)
* [typescript-angular](generators/typescript-angular.md)
* [typescript-aurelia](generators/typescript-aurelia.md)
Expand Down
Loading
Loading