Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-karanjit committed Nov 4, 2024
1 parent 878687e commit 88c163e
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,18 @@ public void renderStructure(Runnable runnable, boolean isInputStructure) {
memberSymbol.getProperty("Referred", Symbol.class).get();
var refShape = targetShape.expectTrait(ReferenceTrait.class);
if (refShape.isService()) {
namespace =
SmithyNameResolver.shapeNamespace(
model.expectShape(refShape.getReferentId())
);
if (
model
.expectShape(refShape.getReferentId())
.hasTrait(ServiceTrait.class)
) {
namespace =
DafnyNameResolver.dafnyTypesNamespace(
model.expectShape(refShape.getReferentId())
);
} else {
namespace =
SmithyNameResolver.shapeNamespace(
model.expectShape(refShape.getReferentId())
);
writer.addImport(SmithyNameResolver.getGoModuleNameForSdkNamespace(
refShape.getReferentId().getNamespace()
));
}
}
if (
Expand Down

0 comments on commit 88c163e

Please sign in to comment.