-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Release/0.22.3 #204
base: master
Are you sure you want to change the base?
Release/0.22.3 #204
Conversation
Pull Request Test Coverage Report for Build 8435310588Details
💛 - Coveralls |
@@ -277,7 +279,8 @@ class CasterSpec extends org.specs2.Specification { def is = s2""" | |||
json"""{"XYZ": 42, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", IntValue(42)))), | |||
json"""{"xyz": null, "XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), | |||
json"""{"XYZ": null, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), | |||
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), | |||
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), //Should be error? | |||
json"""{"xyz": "invalid", "XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), // This one is null now! Should be error? |
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.
Should be error?
I think yes.
@@ -277,7 +279,8 @@ class CasterSpec extends org.specs2.Specification { def is = s2""" | |||
json"""{"XYZ": 42, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", IntValue(42)))), | |||
json"""{"xyz": null, "XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), | |||
json"""{"XYZ": null, "xyz": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), | |||
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), | |||
json"""{"XYZ": "invalid"}""" -> StructValue(List(NamedValue("xyz", NullValue))), //Should be error? |
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.
Should be error?
If line 280 and 281 are not errors, then I think it's ok for this one to also be not an error.
But I'm not strongly opinionated on this one, especially as it's a really weird edge case scenario, which we may never see in production. The important thing is: the loader doesn't break. And we've achieved that.
By the way, you might be wondering... why would a loader receive invalid data anyway, if it has already been validated by Enrich. There are two scenarios that I know of:
If you understand the second scenario, it might help guide you on what is the correct end behaviour. |
No description provided.