-
Notifications
You must be signed in to change notification settings - Fork 165
Update OpenAPIKit to v6 #875
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
simonjbeaumont
merged 26 commits into
apple:main
from
mattpolzin:update-openapi-kit-to-v5
May 5, 2026
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
70f60d0
Bump OpenAPIKit version
iT0ny 29b994e
Update OpenAPI.Content.Encoding usage according to OpenAPIKit v4 Migr…
iT0ny 5911250
Update wording for `testEmitsComplexOpenAPIParsingError` and `testSch…
iT0ny 62fe491
Update checks for null values
iT0ny 0aa0187
Bump OpenAPIKit to 4.3.1 or greater
iT0ny acada4d
Fix "Compatibility test" CI suite
iT0ny 5827f75
Merge branch 'main' into update-openapi-kit-to-v4
iT0ny dfec3ee
Update OpenAPIKit to v5
mattpolzin eec4ef0
remove pre-support for v3.2.0 OpenAPI Documents. these are now suppor…
mattpolzin 6220411
replace content.encoding with content.encodingMap to continue handlin…
mattpolzin 2436218
fix exhaustive checks on parameter location
mattpolzin 7d7527c
fix Content and Content Map code
mattpolzin a389607
fix component entry lookup
mattpolzin 9c9d5af
introduce assumeLookupOnce temporarily to maintain existing invariant…
mattpolzin 63e789c
fix code that inspects UnresolvedSchemas for references
mattpolzin 38bc15c
cleanup/simlipfy after fixing UnresolvedSchema lookups
mattpolzin 2113489
test fixes
mattpolzin e995adc
swift format
mattpolzin e146521
Address Swift 6 on Linux type inference failure
mattpolzin 59478d6
undo Yams minimum version bump
mattpolzin ed59e8f
Merge branch 'main' into update-openapi-kit-to-v5
simonjbeaumont 1a7ac3c
Merge branch 'main' into update-openapi-kit-to-v5
simonjbeaumont f4ae36f
bump to OpenAPIKit 6
mattpolzin 0cfc5db
Merge branch 'main' into update-openapi-kit-to-v5
mattpolzin d421454
Merge branch 'main' into update-openapi-kit-to-v5
mattpolzin ea09784
Merge branch 'main' into update-openapi-kit-to-v5
simonjbeaumont 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
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
Oops, something went wrong.
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.
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.
Is this new check correct? Won't
(anyValue as? String)benilfor non-nullable non-string values?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.
I'm taking a closer look at this now. I inherited this change from the v4 bump.
From what I can tell, this possibility is ruled out because
isNullablemust be true on line105.We are in a case where the "backing type" has been determined to be a string, so I imagine that was the thinking with assuming the allowed values would be strings. I can say for sure that if the JSON Schema is of
stringtype, then OpenAPIKit will special-case its parsing ofallowedValuesto only parseString(orString?if nullable) values. Tracing the calls in the generator project fortranslateRawEnum()I see that it does only pass.stringas the backing type when OpenAPIKit has determined the schema type to be string, so this change actually should be safe and correct, albeit a little involved to sanity check!