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

Remove nil default value #14

Closed
jpbetz opened this issue Dec 8, 2015 · 0 comments
Closed

Remove nil default value #14

jpbetz opened this issue Dec 8, 2015 · 0 comments

Comments

@jpbetz
Copy link
Contributor

jpbetz commented Dec 8, 2015

Based on how we are observing the courier schema language used in practice. We plan to remove = nil defaults. What we’ve observed is that in many cases optional fields that could/should be marked as nil are not. This is inconvenient because it then requires that callees explicitly provide None for parameters that they should not need to. To fix this we are going to change the default behavior. All optional fields will be generated with = None by default in Scala code (= nil in Swift) unless a @explicit property is added to the field (exact name of the property TBD) .

jpbetz pushed a commit that referenced this issue Dec 9, 2015
Summary: See #14

Test Plan: Manually check generated files.
@jpbetz jpbetz closed this as completed Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant