-
Notifications
You must be signed in to change notification settings - Fork 43
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
Nullability support in Plank #64
Conversation
🚫 CI failed with log |
@rahul-malik Here is a diff for adding nullability support to JS / Flow as well as fixes the lint error. That's a diff to fix the error that should work in Swift 3 and 4: After applying both, CI should pass. |
- Add nullability information into Schema IR - Render 'nonnull' or 'nullable' if a property is present in 'required' property. - Update Cocoa / FlowJS examples to incorporate nullability cases - Improve unit test coverage in ObjCIR.swift - Add documentation for nullability support
dc0e64c
to
49e57cd
Compare
@maicki - Please take a look when you get a chance, I've merged your patches and ensured the build compiles and tests pass locally. |
Generated by 🚫 Danger |
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.
Looks good to me.
case nonnull | ||
} | ||
|
||
// Ask @bkase about whether this makes more sense to wrap schemas to express nullability |
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.
cc @bkase
@@ -242,14 +255,18 @@ extension Schema { | |||
})) | |||
} | |||
case JSONType.object: | |||
let requiredProps = Set(propertyInfo["required"] as? [String] ?? []) |
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.
Not for this PR, but as an idea for all of this stringly accessed property infos should we create an enum for that includes the available property info keys?
property.