You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The repository used to contain protocol tests for set shapes e.g.:
RestJsonMalformedSetDuplicateItems
RestJsonMalformedSetNullItem
RestJsonMalformedSetDuplicateBlobs
In a7a16df, sets were deprecated in favor of lists with @uniqueItems, and the name of these tests changed.
In July, in 1b5737a, the tests were removed cc @gosar:
For now, removing these tests to unblock smithy 1.22.0 release.
Re-adding the tests would be nice to ensure smithy-rs is compliant (e.g. same validation error message).
As an aside, shouldn't we also add protocol tests for set shapes, not only list shapes with @uniqueItems? While deprecated in IDL v2, users can still use them. In addition, don't we still have to support IDL v1? In which case we need to ensure we return SerializationExceptions if the model was an IDL v1 model, and ValidationException in case it was an IDL v2 (?). Alternatively, since in smithy-rs we've never supported @uniqueItems or the semantics of set shapes:
we could abort if we detect a set shape in an IDL v1 model when running the server SDK generator, and instruct the user to update their model.
we could apply a model transformation to convert set shapes to list shapes with @uniqueItems, and print a warning saying we will be returning ValidationException.
Guidance is appreciated on this.
The text was updated successfully, but these errors were encountered:
I don't think we need set tests though. Sets were completely removed in IDL v2. The Rust code generator should treat sets from IDL v1 exactly like a list + uniqueItems, and that's easy to do since a uniqueItems trait is added to every IDL v1 set shape automatically (we document that in the 1.0 spec too).
The repository used to contain protocol tests for
set
shapes e.g.:RestJsonMalformedSetDuplicateItems
RestJsonMalformedSetNullItem
RestJsonMalformedSetDuplicateBlobs
In a7a16df, sets were deprecated in favor of lists with
@uniqueItems
, and the name of these tests changed.In July, in 1b5737a, the tests were removed cc @gosar:
Re-adding the tests would be nice to ensure smithy-rs is compliant (e.g. same validation error message).
As an aside, shouldn't we also add protocol tests for
set
shapes, not onlylist
shapes with@uniqueItems
? While deprecated in IDL v2, users can still use them. In addition, don't we still have to support IDL v1? In which case we need to ensure we returnSerializationException
s if the model was an IDL v1 model, andValidationException
in case it was an IDL v2 (?). Alternatively, since in smithy-rs we've never supported@uniqueItems
or the semantics ofset
shapes:set
shape in an IDL v1 model when running the server SDK generator, and instruct the user to update their model.set
shapes tolist
shapes with@uniqueItems
, and print a warning saying we will be returningValidationException
.Guidance is appreciated on this.
The text was updated successfully, but these errors were encountered: