-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[swift5] Add useSPMFileStructure #9074
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
Merged
wing328
merged 6 commits into
OpenAPITools:master
from
aymanbagabas:swift-spmfilestructure
Apr 21, 2021
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1973d5e
[swift5] Add useSPMFileStructure
aymanbagabas d60acd7
[swift5] Add swiftPackagePath
aymanbagabas 7b83f94
[swift5] Add cli options and update docs
aymanbagabas d55d227
[swift5] Fix tests
aymanbagabas cfd2413
[swift5] Update XcodeGen source path
aymanbagabas 2a86757
[swift5] Update samples and docs
aymanbagabas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ Pod::Spec.new do |s| | |
| {{#podDocumentationURL}} | ||
| s.documentation_url = '{{podDocumentationURL}}' | ||
| {{/podDocumentationURL}} | ||
| s.source_files = '{{projectName}}/Classes/**/*.swift' | ||
|
||
| s.source_files = '{{#swiftPackagePath}}{{swiftPackagePath}}{{/swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift' | ||
| {{#usePromiseKit}} | ||
| s.dependency 'PromiseKit/CorePromise', '~> 6.13.1' | ||
| {{/usePromiseKit}} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
samples/client/petstore/swift5/urlsessionLibrary/Sources/Models/ClassModel.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // | ||
| // ClassModel.swift | ||
| // | ||
| // Generated by openapi-generator | ||
| // https://openapi-generator.tech | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| /** Model for testing model with \"_class\" property */ | ||
| public struct ClassModel: Codable, Hashable { | ||
|
|
||
| public var `class`: String? | ||
|
|
||
| public init(`class`: String? = nil) { | ||
| self.`class` = `class` | ||
| } | ||
|
|
||
| public enum CodingKeys: String, CodingKey, CaseIterable { | ||
| case `class` = "_class" | ||
| } | ||
|
|
||
| } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
samples/client/petstore/swift5/urlsessionLibrary/Sources/Models/Model200Response.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // | ||
| // Model200Response.swift | ||
| // | ||
| // Generated by openapi-generator | ||
| // https://openapi-generator.tech | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| /** Model for testing model name starting with number */ | ||
| public struct Model200Response: Codable, Hashable { | ||
|
|
||
| public var name: Int? | ||
| public var `class`: String? | ||
|
|
||
| public init(name: Int? = nil, `class`: String? = nil) { | ||
| self.name = name | ||
| self.`class` = `class` | ||
| } | ||
|
|
||
| public enum CodingKeys: String, CodingKey, CaseIterable { | ||
| case name | ||
| case `class` = "class" | ||
| } | ||
|
|
||
| } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
samples/client/petstore/swift5/urlsessionLibrary/Sources/Models/Return.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // | ||
| // Return.swift | ||
| // | ||
| // Generated by openapi-generator | ||
| // https://openapi-generator.tech | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| /** Model for testing reserved words */ | ||
| public struct Return: Codable, Hashable { | ||
|
|
||
| public var `return`: Int? | ||
|
|
||
| public init(`return`: Int? = nil) { | ||
| self.`return` = `return` | ||
| } | ||
|
|
||
| public enum CodingKeys: String, CodingKey, CaseIterable { | ||
| case `return` = "return" | ||
| } | ||
|
|
||
| } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aymanbagabas thanks for taking my feedback.
Shouldn't just
swiftPackagePathbe enough? In other words, we want to avoid duplicated options do very similar things.