-
Notifications
You must be signed in to change notification settings - Fork 162
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
Changes from 17 commits
70f60d0
29b994e
5911250
62fe491
0aa0187
acada4d
5827f75
dfec3ee
eec4ef0
6220411
2436218
7d7527c
a389607
9c9d5af
63e789c
38bc15c
2113489
e995adc
e146521
59478d6
ed59e8f
1a7ac3c
f4ae36f
0cfc5db
d421454
ea09784
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,7 +100,9 @@ extension FileTranslator { | |
| // In nullable enum schemas, empty strings are parsed as Void. | ||
| // This is unlikely to be fixed, so handling that case here. | ||
| // https://github.com/apple/swift-openapi-generator/issues/118 | ||
| if isNullable && anyValue is Void { | ||
| // Also handle nil values in nullable schemas. | ||
| let isNullValue = anyValue is Void || (anyValue as? String) == nil | ||
| if isNullable && isNullValue { | ||
|
Comment on lines
+103
to
+105
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this new check correct? Won't
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
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 |
||
| try addIfUnique(id: .string(""), caseName: context.safeNameGenerator.swiftMemberName(for: "")) | ||
| } else { | ||
| guard let rawValue = anyValue as? String else { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.