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

OpenAPIKit 4.0.0 release branch (WIP) #340

Draft
wants to merge 125 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
6726d58
beginning to play with an interface for loading external references.
mattpolzin Aug 4, 2023
b658586
continuing to tweak the new external loading interface.
mattpolzin Aug 5, 2023
70c4faf
maybe store source URL as vendor extension.
mattpolzin Aug 6, 2023
83b1ce1
remove testing for swift prior to 5.8
mattpolzin Nov 5, 2023
8458467
update the Package manifest
mattpolzin Nov 5, 2023
4736baf
Merge pull request #339 from mattpolzin/drop-swift-versions
mattpolzin Nov 5, 2023
84d1073
Merge branch 'main' into release/4_0
mattpolzin Nov 7, 2023
87ad2ff
Merge branch 'main' into release/4_0
mattpolzin Nov 14, 2023
a48a435
Fix typos
PARAIPAN9 Nov 14, 2023
3ea2bb4
Merge pull request #348 from PARAIPAN9/paraipan/Fix-typos
mattpolzin Nov 15, 2023
3545fc2
Merge branch 'main' into release/4_0
mattpolzin Dec 1, 2023
00144b2
small improvements to AnyCodable, more tests, and better documentatio…
mattpolzin Dec 2, 2023
0629b7e
Merge pull request #351 from mattpolzin/any-codable-small-improvements
mattpolzin Dec 3, 2023
7b59773
Merge branch 'main' into release/4_0
mattpolzin Dec 7, 2023
5c9fd86
use modern if-let syntax
mattpolzin Dec 10, 2023
74d7001
Merge pull request #353 from mattpolzin/modern-if-let
mattpolzin Dec 10, 2023
6bd7c07
Merge branch 'main' into release/4_0
mattpolzin Feb 24, 2024
9fef5c3
Add Docc to package
mattpolzin Mar 1, 2024
596e173
update code doc link
mattpolzin Mar 1, 2024
5e72749
Adding documentation building to CI
mattpolzin Mar 1, 2024
3bda4e2
Merge pull request #357 from mattpolzin/add-swift-docc
mattpolzin Mar 1, 2024
0d47bee
merge w/ main branch
mattpolzin Mar 1, 2024
fced755
just get things building again
mattpolzin Mar 2, 2024
0a7b5da
Merge branch 'release/4_0' into load-external-references-v4
mattpolzin Mar 2, 2024
33f4d1f
bump macos version to support concurrency. sprinkle some async functi…
mattpolzin Mar 2, 2024
4a479e7
update two tests that use the now-async external dereferencing
mattpolzin Mar 2, 2024
04e31bb
Merge branch 'main' into release/4_0
mattpolzin Mar 27, 2024
32ebe7d
Merge branch 'release/4_0' into load-external-references-v4
mattpolzin Mar 27, 2024
979315e
Merge branch 'main' into release/4_0
mattpolzin Mar 27, 2024
0f426e8
CoreContext vendor extensions are writable, so just pass that along f…
mattpolzin Mar 27, 2024
b8c7c6e
Merge remote-tracking branch 'origin/release/4_0' into load-external-…
mattpolzin Mar 27, 2024
d283a87
simplify code by using OrderedDictionary helper
mattpolzin Mar 27, 2024
ce2a53a
Raise minimum Yams version.
brandonbloom Mar 31, 2024
e07aaf5
Merge pull request #366 from brandonbloom/yaml-nulls
mattpolzin Apr 1, 2024
c1941a7
Merge branch 'release/4_0' into load-external-references-v4
mattpolzin Apr 2, 2024
79a505c
trying another design to allow for more concurrent file loading
mattpolzin Apr 2, 2024
97c7afb
external dereference conformance for either
mattpolzin Apr 6, 2024
1b77de4
Almost entirely switched to new external dereferencing framework
mattpolzin Apr 6, 2024
62758d3
Make path item parameter external dereferencing properly concurrent
mattpolzin Apr 6, 2024
8d90a6d
make code compile. seems like a workaround for some compiler bug to me.
mattpolzin Apr 6, 2024
7863815
fix some tests
mattpolzin Apr 6, 2024
d2aea20
Add some external dereferencing convenience around array and optional
mattpolzin Apr 7, 2024
e142890
Make Server externally dereferenceable
mattpolzin Apr 7, 2024
0a65005
Finish PathItem external dereferencing implementation
mattpolzin Apr 7, 2024
f5177dc
a bit more work towards external dereferencing implementations
mattpolzin Apr 7, 2024
2508f85
Add utility for externally dereferencing a regular non-ordered dictio…
mattpolzin Apr 8, 2024
2b90c7c
a bit more work towards external dereferencing implementations
mattpolzin Apr 8, 2024
fdfb40e
Support external dereferencing for JSONSchema
mattpolzin Apr 9, 2024
3c19777
more external dereferencing conformances
mattpolzin Apr 9, 2024
93486b2
fix temporary test. fix path operation external dereferencing. remove…
mattpolzin Apr 10, 2024
32c0866
quick port of externally dereferenceable to OpenAPIKit30 module
mattpolzin Apr 10, 2024
69cd9f6
Merge branch 'main' into release/4_0
mattpolzin Apr 13, 2024
6d6be19
remove unnecessary change
mattpolzin Apr 18, 2024
3fc8750
rename ExternalLoaderContext to ExternalLoader
mattpolzin Apr 18, 2024
47af348
fill in some actual external dereferencing tests for json references
mattpolzin Apr 18, 2024
f11d2cd
start building a Document test for external dereferencing. fix compon…
mattpolzin Apr 21, 2024
698c29b
Merge branch 'main' into release/4_0
mattpolzin Apr 21, 2024
50f85fe
Merge branch 'release/4_0' into load-external-references-v4-take2
mattpolzin Apr 21, 2024
e17bfd8
Add depth to external dereferencing of the whole document
mattpolzin Apr 21, 2024
b032ded
support depth less naively. allow full depth
mattpolzin Apr 21, 2024
b80657e
fix issue with async ordered dictionary code not retaining original o…
mattpolzin Apr 21, 2024
6ce5f4f
continuing to fill out document external dereferencing test. fix bug …
mattpolzin Apr 22, 2024
773df59
work on fixing ordering bugs in code and test
mattpolzin Apr 22, 2024
d092f48
Add external reference to a Callbacks object.
mattpolzin Apr 23, 2024
e5c44b4
Add links external reference
mattpolzin Apr 23, 2024
bd97176
Add an external dereferencing case that proves the basic collision ch…
mattpolzin Apr 23, 2024
412ec1c
remove unused external dereferencing code
mattpolzin Apr 23, 2024
45b8df9
hit the encoding header external dereference codepath
mattpolzin Apr 23, 2024
76d27d6
undo a workaround that is no longer needed
mattpolzin Apr 23, 2024
9ed9570
clean up some temporary test code
mattpolzin Apr 23, 2024
728218e
update the docs to talk about external dereferencing
mattpolzin Apr 23, 2024
7539414
Merge pull request #369 from mattpolzin/load-external-references-v4-t…
mattpolzin Apr 23, 2024
8c8da70
Merge branch 'load-external-references-v4-take2' into load-external-r…
mattpolzin Apr 24, 2024
2f622ce
remove unneeded conformance
mattpolzin Apr 24, 2024
e4a2b52
go from ExternalLoaderContext to ExternalLoader in OAS 3.0 port. upda…
mattpolzin Apr 24, 2024
0df6960
update OAS 3.0 components merge function. fix tests after refactor.
mattpolzin Apr 24, 2024
8047fe7
finish renaming Context to Loader internally
mattpolzin Apr 24, 2024
67f57a5
remove now unneeded workaround in path item dereferencing
mattpolzin Apr 24, 2024
4788426
update remaining two utility implementations of external dereferencin…
mattpolzin Apr 24, 2024
a6bc177
fix OAS 3.0 test to not use a path item reference
mattpolzin Apr 24, 2024
042a54a
Fix support for setting vendor extensions on JSONSchema values.
mattpolzin Apr 24, 2024
a49d111
Support setting vendor extensions including on JSON Schemas and carry…
mattpolzin Apr 24, 2024
34b34b0
Merge pull request #373 from mattpolzin/load-external-references-v4-t…
mattpolzin Apr 24, 2024
e599b45
pipe messages through all external dereferencing
mattpolzin Apr 24, 2024
a752a43
make result of Document external dereferencing discardable. fix json …
mattpolzin Apr 24, 2024
76898f6
port loader messages over to OAS 3.0
mattpolzin Apr 25, 2024
595c80f
update tests
mattpolzin Apr 25, 2024
c6d90f5
update README
mattpolzin Apr 25, 2024
1d8f556
test external dereferencing messages at the full document level.
mattpolzin Apr 25, 2024
cbc02af
expand test coverage
mattpolzin Apr 25, 2024
3744e9c
fix whitespace, recurse one step further.
mattpolzin Apr 25, 2024
aeed072
fix tests i broke
mattpolzin Apr 25, 2024
6ab90e5
Add missing components-> links external dereferencing.
mattpolzin Apr 25, 2024
da089f8
see if this is the difference between compilation succeeding or not
mattpolzin Apr 26, 2024
7055ecb
see if I can uncomment most of it
mattpolzin Apr 26, 2024
a3d852c
try and find the limit
mattpolzin Apr 26, 2024
f8e3248
use newer swift for codecov (faster compilation)
mattpolzin Apr 26, 2024
a0513e6
Merge pull request #374 from mattpolzin/add-external-loader-message-s…
mattpolzin Apr 26, 2024
3fde60e
add external dereferencing and v4 to the features/versions table
mattpolzin Apr 26, 2024
b4daf9b
Merge branch 'main' into release/4_0
mattpolzin Jun 16, 2024
bc0cb9f
merge w/ main
mattpolzin Jul 19, 2024
8a3ad28
remove deprecated content encoding property
mattpolzin Jul 19, 2024
3d66657
don't test against bionic 5.8 image
mattpolzin Jul 19, 2024
d11fe0c
remove jsonschema fallback implementations. fix code that used old co…
mattpolzin Jul 20, 2024
7ec8446
update some tests
mattpolzin Jul 20, 2024
ded104d
Merge pull request #380 from mattpolzin/remove-deprecated-property
mattpolzin Jul 21, 2024
198d90d
remove outdated code comments
mattpolzin Jul 21, 2024
8afee98
Merge branch 'main' into release/4_0
mattpolzin Oct 3, 2024
f80f2e3
use newer if let syntax
mattpolzin Oct 3, 2024
a526991
use Swift 5.10 to build docs
mattpolzin Oct 3, 2024
2c87d70
Merge branch 'main' into release/4_0
mattpolzin Oct 4, 2024
bfbc86f
get rid of check for unsupported versions of Swift
mattpolzin Oct 4, 2024
c76e824
Merge branch 'main' into release/4_0
mattpolzin Oct 13, 2024
3a2e80e
remove deprecated misspelled builtin validations
mattpolzin Oct 13, 2024
446a10a
Merge branch 'main' into release/4_0
mattpolzin Nov 1, 2024
4141510
use newest versions of OAS by default for new document construction
mattpolzin Nov 1, 2024
12f6ed7
replace spec 3.0.3 links with 3.0.4 links
mattpolzin Nov 1, 2024
88162c7
replace spec 3.1.0 links with 3.1.1 links
mattpolzin Nov 1, 2024
76f3d2f
default to 3.1.1 when converting. pick up slightly outdated error mes…
mattpolzin Nov 1, 2024
e66baba
update document tests
mattpolzin Nov 1, 2024
b73751a
update error test
mattpolzin Nov 1, 2024
bc1d339
Merge pull request #387 from mattpolzin/oas-version-maintenance
mattpolzin Nov 1, 2024
97d026e
use Encoder and Decoder userInfo to configure VendorExtension support…
mattpolzin Nov 1, 2024
6641ac3
use Encoder and Decoder userInfo to configure VendorExtension support…
mattpolzin Nov 1, 2024
2daac57
Merge pull request #388 from mattpolzin/disable-vendor-extensions-via…
mattpolzin Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [pull_request]
jobs:
codecov:
container:
image: swift:5.8
image: swift:5.10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
36 changes: 22 additions & 14 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,33 @@ name: Documentation
on:
push:
branches:
- main
- release/4_0
# ^ for now, we only want to use the v4.0 release branch.

jobs:
build:
runs-on: ubuntu-latest
container:
image: swift:5.10

steps:
- uses: actions/checkout@v4
# TODO: replace the documentation generator with something that is still maintained.
- name: Build Docs
run: |
mkdir -p ./gh-pages
swift package --allow-writing-to-directory ./gh-pages/docs \
generate-documentation --include-extended-types \
--disable-indexing \
--output-path ./gh-pages/docs \
--transform-for-static-hosting \
--hosting-base-path OpenAPIKit \
--target OpenAPIKit
- name: Install rsync
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
folder: gh-pages
branch: gh-pages

# - name: Generate Documentation
# uses: SwiftDocOrg/swift-doc@master
# with:
# inputs: Sources
# module-name: OpenAPIKit
# output: Documentation
# - name: Upload Documentation to Wiki
# uses: SwiftDocOrg/github-wiki-publish-action@v1
# with:
# path: Documentation
# env:
# GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
40 changes: 1 addition & 39 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,6 @@ jobs:
fail-fast: false
matrix:
image:
- swift:5.2-focal
- swift:5.2-centos8
- swift:5.3-focal
- swift:5.3-centos8
# see below for 5.4, 5.5, etc.
container: ${{ matrix.image }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
run: swift test --enable-test-discovery
# 5.4 is separate because there was a bug in the compiler that caused
# us to need to run swift tets with the -sil-verify-none flag.
linux-5_4:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- swift:5.4-focal
- swift:5.4-centos8
container: ${{ matrix.image }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests (without test discovery flag)
run: swift test -Xswiftc -Xfrontend -Xswiftc -sil-verify-none
linux-5_5-plus:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- swift:5.5-focal
- swift:5.5-centos8
- swift:5.6-focal
- swift:5.7-focal
- swift:5.7-jammy
- swift:5.8-focal
- swift:5.8-jammy
- swift:5.9-focal
Expand Down Expand Up @@ -84,4 +46,4 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
run: swift test --enable-test-discovery
run: swift test
42 changes: 29 additions & 13 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
{
"object": {
"pins": [
{
"package": "Yams",
"repositoryURL": "https://github.com/jpsim/Yams.git",
"state": {
"branch": null,
"revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa",
"version": "4.0.6"
}
"pins" : [
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin",
"state" : {
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
"version" : "1.3.0"
}
]
},
"version": 1
},
{
"identity" : "swift-docc-symbolkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-symbolkit",
"state" : {
"revision" : "b45d1f2ed151d057b54504d653e0da5552844e34",
"version" : "1.0.0"
}
},
{
"identity" : "yams",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/Yams.git",
"state" : {
"revision" : "8a835d918245ca22f36663dd3862138805d7f707",
"version" : "5.1.0"
}
}
],
"version" : 2
}
10 changes: 6 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version:5.1
// swift-tools-version: 5.8

import PackageDescription

let package = Package(
name: "OpenAPIKit",
platforms: [
.macOS(.v10_10),
.macOS(.v10_15),
.iOS(.v11)
],
products: [
Expand All @@ -20,12 +20,14 @@ let package = Package(
targets: ["OpenAPIKitCompat"]),
],
dependencies: [
.package(url: "https://github.com/jpsim/Yams.git", "4.0.0"..<"6.0.0") // just for tests
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/jpsim/Yams.git", "5.1.0"..<"6.0.0") // just for tests
],
targets: [
.target(
name: "OpenAPIKitCore",
dependencies: []),
dependencies: [],
exclude: ["AnyCodable/README.md"]),
.testTarget(
name: "OpenAPIKitCoreTests",
dependencies: ["OpenAPIKitCore"]),
Expand Down
Loading