Skip to content

Commit 2550da2

Browse files
authored
Merge pull request #340 from mattpolzin/release/4_0
OpenAPIKit 4.0.0 release branch
2 parents e0ecdf0 + 23628ed commit 2550da2

File tree

217 files changed

+4361
-1201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+4361
-1201
lines changed

.github/workflows/codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on: [pull_request]
55
jobs:
66
codecov:
77
container:
8-
image: swift:5.8
8+
image: swift:5.10
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- run: swift test --enable-test-discovery --enable-code-coverage
1313
- id: analysis
1414
uses: mattpolzin/[email protected]

.github/workflows/documentation.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11+
container:
12+
image: swift:5.10
1113

1214
steps:
13-
- uses: actions/checkout@v4
14-
# TODO: replace the documentation generator with something that is still maintained.
15+
- uses: actions/checkout@v5
16+
- name: Build Docs
17+
run: |
18+
mkdir -p ./gh-pages
19+
swift package --allow-writing-to-directory ./gh-pages/docs \
20+
generate-documentation --include-extended-types \
21+
--disable-indexing \
22+
--output-path ./gh-pages/docs \
23+
--transform-for-static-hosting \
24+
--hosting-base-path OpenAPIKit \
25+
--target OpenAPIKit
26+
- name: Install rsync
27+
run: |
28+
apt-get update && apt-get install -y rsync
29+
- name: Deploy to GitHub Pages
30+
uses: JamesIves/[email protected]
31+
with:
32+
folder: gh-pages
33+
branch: gh-pages
1534

16-
# - name: Generate Documentation
17-
# uses: SwiftDocOrg/swift-doc@master
18-
# with:
19-
# inputs: Sources
20-
# module-name: OpenAPIKit
21-
# output: Documentation
22-
# - name: Upload Documentation to Wiki
23-
# uses: SwiftDocOrg/github-wiki-publish-action@v1
24-
# with:
25-
# path: Documentation
26-
# env:
27-
# GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

.github/workflows/tests.yml

Lines changed: 7 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,6 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
image:
16-
- swift:5.2-focal
17-
- swift:5.2-centos8
18-
- swift:5.3-focal
19-
- swift:5.3-centos8
20-
# see below for 5.4, 5.5, etc.
21-
container: ${{ matrix.image }}
22-
steps:
23-
- name: Checkout code
24-
uses: actions/checkout@v4
25-
- name: Run tests
26-
run: swift test --enable-test-discovery
27-
# 5.4 is separate because there was a bug in the compiler that caused
28-
# us to need to run swift tets with the -sil-verify-none flag.
29-
linux-5_4:
30-
runs-on: ubuntu-latest
31-
strategy:
32-
fail-fast: false
33-
matrix:
34-
image:
35-
- swift:5.4-focal
36-
- swift:5.4-centos8
37-
container: ${{ matrix.image }}
38-
steps:
39-
- name: Checkout code
40-
uses: actions/checkout@v4
41-
- name: Run tests (without test discovery flag)
42-
run: swift test -Xswiftc -Xfrontend -Xswiftc -sil-verify-none
43-
linux-5_5-plus:
44-
runs-on: ubuntu-latest
45-
strategy:
46-
fail-fast: false
47-
matrix:
48-
image:
49-
- swift:5.5-focal
50-
- swift:5.5-centos8
51-
- swift:5.6-focal
52-
- swift:5.7-focal
53-
- swift:5.7-jammy
5416
- swift:5.8-focal
5517
- swift:5.8-jammy
5618
- swift:5.9-focal
@@ -60,14 +22,17 @@ jobs:
6022
- swift:6.0-focal
6123
- swift:6.0-jammy
6224
- swift:6.0-noble
25+
- swift:6.1-focal
26+
- swift:6.1-jammy
27+
- swift:6.1-noble
6328
- swiftlang/swift:nightly-focal
6429
- swiftlang/swift:nightly-jammy
6530
container: ${{ matrix.image }}
6631
steps:
6732
- name: Checkout code
68-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
6934
- name: Run tests
70-
run: swift test
35+
run: swift test -Xswiftc -strict-concurrency=complete
7136
osx:
7237
strategy:
7338
fail-fast: false
@@ -82,6 +47,6 @@ jobs:
8247
with:
8348
xcode-version: latest
8449
- name: Checkout code
85-
uses: actions/checkout@v4
50+
uses: actions/checkout@v5
8651
- name: Run tests
87-
run: swift test --enable-test-discovery
52+
run: swift test -Xswiftc -strict-concurrency=complete

CONTRIBUTING.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Thank you for considering contributing to OpenAPIKit!
22

33
Take a look at the [Code of Conduct](https://github.com/mattpolzin/OpenAPIKit/blob/master/CODE_OF_CONDUCT.md) and note the [MIT license](https://github.com/mattpolzin/OpenAPIKit/blob/master/LICENSE.txt) associated with this project.
44

5-
If you are preparing a change for the current release of OpenAPIKit (major version 3), branch off of the `main` branch of this repositroy. If you are preparing a fix for version 2 of OpenAPIKit, branch off of the `release/2_x` branch of this repository. If you are preparing a change for the next major release of OpenAPIKit (major version 4), branch off of the `release/4_0` branch of this repository.
5+
If you are preparing a change for the current release of OpenAPIKit (major version 4), branch off of the `main` branch of this repositroy. If you are preparing a fix for version 3 of OpenAPIKit, branch off of the `release/3_x` branch of this repository. If you are preparing a change for the next major release of OpenAPIKit (major version `5`), branch off of the `release/5_0` branch of this repository.
66

77
Please do the following in the course of preparing a branch and pull request for this project.
88

@@ -13,17 +13,15 @@ Please do the following in the course of preparing a branch and pull request for
1313

1414
### Goals for each currently maintained major version
1515

16-
`2.x`: Non-breaking changes that fix bugs for working with OpenAPI 3.0.x.
17-
`3.x`: Non-breaking changes that fix bugs or add improvements to the support of either OpenAPI 3.0.x or OpenAPI 3.1.x.
16+
`3.x`: Non-breaking changes that fix bugs or add improvements to the support of either OpenAPI Spec v3.0.x or OpenAPI Spec v3.1.x.
17+
`4.x`: Non-breaking changes that fix bugs or add improvements to the support of OpenAPI Spec v3.0.x, OpenAPI Spec v3.1.x, external dereferencing, or Swift concurrency.
1818

1919
#### Goals for the Next/unreleased version
20-
The next major version will be `4.0`.
20+
The next major version will be `5.0`.
2121

22-
This release will prioritize code-rewriting and project configuration updates that modernize the Swift used in this project.
22+
Priorities for this release have not been settled on yet.
2323

24-
**Please create GitHub issues** to propose any specific code refactoring you would like to do as I am opinionated about the degree to which I want to refactor; in other words, I aim to adopt more modern Swift, but avoid structural changes motivated by a difference in opinion rather than common Swift coding practices.
25-
26-
An example of a change I would love to see (albeit an especially trivial one) is the replacement of `if let something = something` with `if let something` (i.e. code that rebinds an optional to the same name within the following conditional scope). There are other trivial syntax transformations like this that I would very much appreciate.
24+
**Please create GitHub issues** to propose any specific code refactoring or breaking changes you would like to see as I am opinionated about the degree to which I want to refactor and breaking changes should be well motivated; in other words, I aim to adopt more modern Swift, but avoid structural changes motivated by a difference in opinion rather than common Swift coding practices.
2725

2826
An example of a change I am open to but has slightly more potential for disruption would be refactoring generic code to use new `any`/`some` keywords. I would want to think through the specific suggestion and discuss in a GitHub ticket prior to seeing the Pull Request.
2927

Package.resolved

Lines changed: 29 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// swift-tools-version:5.1
1+
// swift-tools-version: 5.8
22

33
import PackageDescription
44

55
let package = Package(
66
name: "OpenAPIKit",
77
platforms: [
8-
.macOS(.v10_10),
8+
.macOS(.v10_15),
99
.iOS(.v11)
1010
],
1111
products: [
@@ -20,12 +20,14 @@ let package = Package(
2020
targets: ["OpenAPIKitCompat"]),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/jpsim/Yams.git", "4.0.0"..<"7.0.0") // just for tests
23+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
24+
.package(url: "https://github.com/jpsim/Yams.git", "5.1.0"..<"7.0.0") // just for tests
2425
],
2526
targets: [
2627
.target(
2728
name: "OpenAPIKitCore",
28-
dependencies: []),
29+
dependencies: [],
30+
exclude: ["AnyCodable/README.md"]),
2931
.testTarget(
3032
name: "OpenAPIKitCoreTests",
3133
dependencies: ["OpenAPIKitCore"]),

0 commit comments

Comments
 (0)