Skip to content

Commit c73f44f

Browse files
committed
Skip input and output shape generation when operation is excluded.
Skip event stream API in S3
1 parent 707ced8 commit c73f44f

File tree

4 files changed

+1450
-614
lines changed

4 files changed

+1450
-614
lines changed

codegen/src/main/java/software/amazon/awssdk/codegen/customization/processors/OperationModifiersProcessor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public void postprocess(IntermediateModel intermediateModel) {
115115
}
116116

117117
private void preprocessExclude(ServiceModel serviceModel, String operationName) {
118+
Operation operation = serviceModel.getOperation(operationName);
119+
// Remove input and output shapes of the operation
120+
serviceModel.getShapes().remove(operation.getInput().getShape());
121+
serviceModel.getShapes().remove(operation.getOutput().getShape());
122+
118123
serviceModel.getOperations().remove(operationName);
119124
}
120125

codegen/src/main/java/software/amazon/awssdk/codegen/model/config/customization/OperationModifier.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public class OperationModifier {
2929

3030
/**
3131
* @return true if this operation should be excluded when processing the
32-
* service model.
32+
* service model. When this option is set, both input and output
33+
* shapes are excluded too.
3334
*/
3435
public boolean isExclude() {
3536
return exclude;

services/s3/src/main/resources/codegen-resources/customization.config

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,10 @@
2626
"CLOUD_FRONT_ID" : "X-Amz-Cf-Id",
2727
"REQUEST_ID" : "x-amz-request-id"
2828
},
29-
"customProtocolFactoryFqcn": "software.amazon.awssdk.protocols.xml.AwsS3ProtocolFactory"
30-
}
29+
"customProtocolFactoryFqcn": "software.amazon.awssdk.protocols.xml.AwsS3ProtocolFactory",
30+
"operationModifiers": {
31+
"SelectObjectContent" : {
32+
"exclude": true
33+
}
34+
}
35+
}

0 commit comments

Comments
 (0)