-
Notifications
You must be signed in to change notification settings - Fork 221
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
@uniqueItems
and sparse lists
#1577
Comments
Lists with uniqueItems can't contain null because they aren't marked as sparse (and they can't be marked as sparse, the spec does mention this where it says "Conflicts with sparse trait"). Servers should reject lists that contain a null entry unless they're marked as sparse. This is covered in the docs for list member optionality. So given this, the only remaining question is the error message I think? I don't think the message should be specified and can be left up to the implementation. The HTTP status code should be 400 since it's a bad request. Does that answer the question? |
Thanks, I completely missed that!
I'm not sure that this is obvious from my reading of that section. It's intuitive to expect that
I think it suffices to provide a normative reference for the message in the protocol tests, we have an opportunity to homogenize among implementations. I can contribute the ones used in smithy-typescript in #1541, and attempt to provide a similar one for the case I described. |
To clarify, this is how it's supposed to work, right?
I did find protocol test coverage for (1), namely, the Is (2) correct? Is there protocol test coverage for this behavior? |
Given that the |
That sounds right to me. Thanks for digging into this. |
Closing since it appears this was resolved. |
From the list of removed protocol tests on
@uniqueItems
that I'm trying to resurrect (see #1541), I have questions on this one:It seems like if a server encounters
null
for the value of a member of a@uniqueItems
-constrained list, the request should be rejected.@uniqueItems
-constrained lists? i.e. are there cases wherenull
values for non-@sparse
lists should simply be ignored but the request should be accepted?null
values in addition tonull
values?@sparse
and@uniqueItems
are incompatible, but the spec does not mention this.The text was updated successfully, but these errors were encountered: