-
Notifications
You must be signed in to change notification settings - Fork 748
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
require the caller to define native assets[...].ID #1123
Changes from all commits
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"context": 1, | ||
"plcmttype": 1, | ||
"assets": [ | ||
{ | ||
"id": 1, | ||
"img": { | ||
"wmin": 30 | ||
} | ||
}, | ||
{ | ||
"id": 1, | ||
"title": { | ||
"len": 20 | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"context": 1, | ||
"plcmttype": 1, | ||
"assets": [ | ||
{ | ||
"id": 1, | ||
"img": { | ||
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 am wondering.. is this test case actually for an invalid native request? Based on our assumption that there's gonna be asset IDs either specified or not specified for all assets and that we don't expect partial IDs to be specified, this would actually be a valid-native test case, no? I guess it gets a little tricky when we consider assets with partial IDs set. We will treat them as if all asset IDs are set and so the assets that don't have asset IDs set will have zero values and we will therefore consider them not being unique asset IDs and return an error which is a fair behavior. But, if only one of the assets doesn't have an ID set, like in this case, then we won't return an error because one asset with a 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. And looks like that is actually one of the tests that's failing:
|
||
"wmin": 30 | ||
} | ||
}, | ||
{ | ||
"title": { | ||
"len": 20 | ||
} | ||
}, | ||
{ | ||
"img": { | ||
"wmin": 50 | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,10 @@ | |
"plcmttype": 1, | ||
"assets": [ | ||
{ | ||
"id": 2, | ||
"id": 1, | ||
"img": { | ||
"hmin": 30, | ||
"wmin": 20 | ||
"wmin": 30 | ||
} | ||
} | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
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. Can we please add some more test cases like for example, one with multiple assets with unique asset IDs, one with multiple assets but with non-unique asset IDs, one with multiple assets with unique asset IDs but one of the assets having asset ID |
||
"context": 1, | ||
"plcmttype": 1, | ||
"assets": [ | ||
{ | ||
"img": { | ||
"wmin": 30 | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"context": 1, | ||
"plcmttype": 1, | ||
"assets": [ | ||
{ | ||
"id": 1, | ||
"img": { | ||
"wmin": 30 | ||
} | ||
}, | ||
{ | ||
"id": 2, | ||
"title": { | ||
"len": 20 | ||
} | ||
} | ||
] | ||
} |
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.
From the code it seems like we expect that asset IDs are either specified or not specified for all assets i.e it can't be that they are specified for some and not for others, right?
I am not a 100% sure if we can make that assumption or not so just wanted to call it out and make sure that indeed is the case.
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.
thats indeed the case