Skip to content

Commit 1cdc158

Browse files
authored
Patching override s3expire shape (#3180)
* always reshape s3expires to timestamp for backwards compatibility
1 parent 1745ede commit 1cdc158

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "c989077e-f82d-4e47-817a-6d88dd6262ad",
3+
"type": "bugfix",
4+
"description": "Statically define s3 expires shape as timestamp, this patch should guarantee s3 operations backwards compatibility after s3 team removes the expires reshape.",
5+
"modules": [
6+
"."
7+
]
8+
}

codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/service/s3/S3ExpiresShapeCustomization.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import software.amazon.smithy.model.shapes.Shape;
3333
import software.amazon.smithy.model.shapes.ShapeId;
3434
import software.amazon.smithy.model.shapes.StringShape;
35+
import software.amazon.smithy.model.shapes.TimestampShape;
3536
import software.amazon.smithy.model.traits.DeprecatedTrait;
3637
import software.amazon.smithy.model.traits.DocumentationTrait;
3738
import software.amazon.smithy.model.traits.HttpHeaderTrait;
@@ -64,6 +65,10 @@ public Model preprocessModel(Model model, GoSettings settings) {
6465
}
6566

6667
var withExpiresString = model.toBuilder()
68+
.removeShape(S3_EXPIRES)
69+
.addShape(TimestampShape.builder()
70+
.id(S3_EXPIRES)
71+
.build())
6772
.addShape(StringShape.builder()
6873
.id(S3_EXPIRES_STRING)
6974
.build())

0 commit comments

Comments
 (0)