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

Add swift6 generator #19621

Merged
merged 24 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b79a7e2
[Swift6] create Swift6 generator
4brunu Sep 16, 2024
4a444e7
[Swift6] create Swift6 generator
4brunu Sep 16, 2024
71781eb
Update vapor integration
4brunu Sep 17, 2024
ea32ad1
Update bitrise stack to Xcode 16
4brunu Sep 17, 2024
2932923
[Swift6] tryped throws
4brunu Sep 19, 2024
c9b744c
[Swift6] tryped throws
4brunu Sep 19, 2024
7e99373
[Swift6] combine deferred and api static method
4brunu Sep 19, 2024
df2fcb4
[Swift6] update readme
4brunu Sep 19, 2024
4c062dd
[Swift6] fix some errors
4brunu Sep 19, 2024
9a9c6af
[Swift6] fix some errors
4brunu Sep 20, 2024
a5934e2
Merge branch 'upstream_master' into feature/swift6
4brunu Sep 20, 2024
fa2def6
[Swift6] fix some errors
4brunu Sep 20, 2024
80b7965
[Swift6] update docs
4brunu Sep 20, 2024
9daae72
[Swift6] update docs
4brunu Sep 20, 2024
b4edca5
Use multiline comments for examples in csharp generator (#19079)
ReallyLiri Sep 22, 2024
e1a1d7a
Uncomment File::deleteOnExit (#19624)
gcatanese Sep 22, 2024
8821cf0
[Core/Rust Server] Check references in additionalProperties correctly…
richardwhiuk Sep 22, 2024
fb36272
[Rust Server] Handle arrays in forms (#19625)
richardwhiuk Sep 22, 2024
ff97f81
Merge branch 'feature/swift6' of https://github.com/4brunu/openapi-ge…
wing328 Sep 22, 2024
af7ab15
[Swift6] fix CI
4brunu Sep 23, 2024
6cab2a8
Merge branch 'feature/swift6' into 4brunu-feature/swift6b
4brunu Sep 23, 2024
b08d3f1
[Swift6] fix CI
4brunu Sep 23, 2024
8df3695
[Swift6] fix CI
4brunu Sep 23, 2024
4eb2331
[Swift6] fix CI
4brunu Sep 23, 2024
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