Skip to content

Commit

Permalink
Remove MetadataBearer from output type
Browse files Browse the repository at this point in the history
Metadata on output type on client SDK makes sense, but on the server
SDK does not.
  • Loading branch information
gosar authored and srchase committed Mar 17, 2023
1 parent 6993281 commit 9d1293f
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,11 @@ private void renderNamespace(String typeName, StructureShape input) {
}

private void writeOutputType(String typeName, Optional<StructureShape> outputShape) {
// Output types should always be MetadataBearers, possibly in addition
// to a defined output shape.
writer.addImport("MetadataBearer", "__MetadataBearer", TypeScriptDependency.AWS_SDK_TYPES.packageName);
if (outputShape.isPresent()) {
writer.write("export interface $L extends $T, __MetadataBearer {}",
writer.write("export interface $L extends $T {}",
typeName, symbolProvider.toSymbol(outputShape.get()));
} else {
writer.write("export interface $L extends __MetadataBearer {}", typeName);
writer.write("export interface $L {}", typeName);
}
}

Expand Down

0 comments on commit 9d1293f

Please sign in to comment.