Skip to content

Commit e5d0e35

Browse files
Initial commit
Co-authored-by: Honza Dvorsky <[email protected]> Co-authored-by: Si Beaumont <[email protected]>
0 parents  commit e5d0e35

27 files changed

+1324
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Motivation
2+
3+
_[Explain here the context, and why you're making that change. What is the problem you're trying to solve.]_
4+
5+
### Modifications
6+
7+
_[Describe the modifications you've made.]_
8+
9+
### Result
10+
11+
_[After your change, what will change.]_
12+
13+
### Test Plan
14+
15+
_[Describe the steps you took, or will take, to qualify the change - such as adjusting tests and manual testing.]_

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.DS_Store
2+
.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
.vscode
9+
/Package.resolved
10+
.ci/
11+
.docc-build/

.spi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 1
2+
builder:
3+
configs:
4+
- documentation_targets:
5+
- OpenAPIURLSession

.swift-format

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"fileScopedDeclarationPrivacy" : {
3+
"accessLevel" : "private"
4+
},
5+
"indentation" : {
6+
"spaces" : 4
7+
},
8+
"indentConditionalCompilationBlocks" : false,
9+
"indentSwitchCaseLabels" : false,
10+
"lineBreakAroundMultilineExpressionChainComponents" : true,
11+
"lineBreakBeforeControlFlowKeywords" : false,
12+
"lineBreakBeforeEachArgument" : true,
13+
"lineBreakBeforeEachGenericRequirement" : true,
14+
"lineLength" : 120,
15+
"maximumBlankLines" : 1,
16+
"prioritizeKeepingFunctionOutputTogether" : false,
17+
"respectsExistingLineBreaks" : true,
18+
"rules" : {
19+
"AllPublicDeclarationsHaveDocumentation" : false,
20+
"AlwaysUseLowerCamelCase" : false,
21+
"AmbiguousTrailingClosureOverload" : true,
22+
"BeginDocumentationCommentWithOneLineSummary" : false,
23+
"DoNotUseSemicolons" : true,
24+
"DontRepeatTypeInStaticProperties" : false,
25+
"FileScopedDeclarationPrivacy" : true,
26+
"FullyIndirectEnum" : true,
27+
"GroupNumericLiterals" : true,
28+
"IdentifiersMustBeASCII" : true,
29+
"NeverForceUnwrap" : false,
30+
"NeverUseForceTry" : false,
31+
"NeverUseImplicitlyUnwrappedOptionals" : false,
32+
"NoAccessLevelOnExtensionDeclaration" : false,
33+
"NoAssignmentInExpressions" : true,
34+
"NoBlockComments" : true,
35+
"NoCasesWithOnlyFallthrough" : true,
36+
"NoEmptyTrailingClosureParentheses" : true,
37+
"NoLabelsInCasePatterns" : false,
38+
"NoLeadingUnderscores" : false,
39+
"NoParensAroundConditions" : true,
40+
"NoVoidReturnOnFunctionSignature" : true,
41+
"OneCasePerLine" : true,
42+
"OneVariableDeclarationPerLine" : true,
43+
"OnlyOneTrailingClosureArgument" : true,
44+
"OrderedImports" : false,
45+
"ReturnVoidInsteadOfEmptyTuple" : true,
46+
"UseEarlyExits" : true,
47+
"UseLetInEveryBoundCaseVariable" : false,
48+
"UseShorthandTypeNames" : true,
49+
"UseSingleLinePropertyGetter" : false,
50+
"UseSynthesizedInitializer" : true,
51+
"UseTripleSlashForDocumentationComments" : true,
52+
"UseWhereClausesInForLoops" : false,
53+
"ValidateDocumentationComments" : false
54+
},
55+
"spacesAroundRangeFormationOperators" : false,
56+
"tabWidth" : 8,
57+
"version" : 1
58+
}

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Code of Conduct
2+
3+
The code of conduct for this project can be found at https://swift.org/code-of-conduct.
4+
5+
<!-- Copyright (c) 2023 Apple Inc and the Swift Project authors. All Rights Reserved. -->

CONTRIBUTING.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
## Legal
2+
3+
By submitting a pull request, you represent that you have the right to license
4+
your contribution to Apple and the community, and agree by submitting the patch
5+
that your contributions are licensed under the Apache 2.0 license (see
6+
`LICENSE.txt`).
7+
8+
## How to submit a bug report
9+
10+
Please report any issues related to this library in the
11+
[swift-openapi-generator](https://github.com/apple/swift-openapi-generator/issues)
12+
repository.
13+
14+
Specify the following:
15+
16+
* Commit hash
17+
* Contextual information (e.g. what you were trying to achieve with swift-openapi-urlsession)
18+
* Simplest possible steps to reproduce
19+
* More complex the steps are, lower the priority will be.
20+
* A pull request with failing test case is preferred, but it's just fine to paste the test case into the issue description.
21+
* Anything that might be relevant in your opinion, such as:
22+
* Swift version or the output of `swift --version`
23+
* OS version and the output of `uname -a`
24+
* Network configuration
25+
26+
### Example
27+
28+
```
29+
Commit hash: b17a8a9f0f814c01a56977680cb68d8a779c951f
30+
31+
Context:
32+
While testing my application that uses with swift-openapi-urlsession, I noticed that ...
33+
34+
Steps to reproduce:
35+
1. ...
36+
2. ...
37+
3. ...
38+
4. ...
39+
40+
$ swift --version
41+
Swift version 4.0.2 (swift-4.0.2-RELEASE)
42+
Target: x86_64-unknown-linux-gnu
43+
44+
Operating system: Ubuntu Linux 16.04 64-bit
45+
46+
$ uname -a
47+
Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
48+
49+
My system has IPv6 disabled.
50+
```
51+
52+
## Writing a Patch
53+
54+
A good patch is:
55+
56+
1. Concise, and contains as few changes as needed to achieve the end result.
57+
2. Tested, ensuring that any tests provided failed before the patch and pass after it.
58+
3. Documented, adding API documentation as needed to cover new functions and properties.
59+
4. Accompanied by a great commit message, using our commit message template.
60+
61+
### Run `./scripts/soundness.sh`
62+
63+
The scripts directory contains a [soundness.sh script](https://github.com/apple/swift-openapi-urlsession/blob/main/scripts/soundness.sh)
64+
that enforces additional checks, like license headers and formatting style.
65+
66+
Please make sure to `./scripts/soundness.sh` before pushing a change upstream, otherwise it is likely the PR validation will fail
67+
on minor changes such as a missing `self.` or similar formatting issues.
68+
69+
For frequent contributors, we recommend adding the script as a [git pre-push hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks), which you can do via executing the following command in the project root directory:
70+
71+
```bash
72+
cat << EOF > .git/hooks/pre-push
73+
74+
if [[ -f "scripts/soundness.sh" ]]; then
75+
scripts/soundness.sh
76+
fi
77+
EOF
78+
```
79+
80+
Which makes the script execute, and only allow the `git push` to complete if the check has passed.
81+
82+
In the case of formatting issues, you can then `git add` the formatting changes, and attempt the push again.
83+
84+
## How to contribute your work
85+
86+
Please open a pull request at https://github.com/apple/swift-openapi-urlsession. Make sure the CI passes, and then wait for code review.

CONTRIBUTORS.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
For the purpose of tracking copyright, this is the list of individuals and
2+
organizations who have contributed source code to SwiftOpenAPIGenerator.
3+
4+
For employees of an organization/company where the copyright of work done
5+
by employees of that company is held by the company itself, only the company
6+
needs to be listed here.
7+
8+
## COPYRIGHT HOLDERS
9+
10+
- Apple Inc. (all contributors with '@apple.com')
11+
12+
### Contributors
13+
14+
- Honza Dvorsky <[email protected]>
15+
- Si Beaumont <[email protected]>
16+
17+
**Updating this list**
18+
19+
Please do not edit this file manually. It is generated using `./scripts/generate-contributors-list.sh`. If a name is misspelled or appearing multiple times: add an entry in `./.mailmap`

0 commit comments

Comments
 (0)