Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-karanjit committed Nov 4, 2024
1 parent aab2c4f commit 878687e
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,21 @@ protected String referenceStructureShape(final StructureShape shape) {
}

if (resourceOrService.asServiceShape().isPresent()) {
writer.addImportFromModule(
SmithyNameResolver.getGoModuleNameForSmithyNamespace(
resourceOrService.toShapeId().getNamespace()
),
DafnyNameResolver.dafnyTypesNamespace(resourceOrService)
);
final var shim = "%swrapped.Shim".formatted(
DafnyNameResolver.dafnyNamespace(
resourceOrService.expectTrait(ServiceTrait.class)
)
var clientConversion = dataSource;
if (resourceOrService.hasTrait(ServiceTrait.class)) {
writer.addImportFromModule(
SmithyNameResolver.getGoModuleNameForSmithyNamespace(
resourceOrService.toShapeId().getNamespace()
),
DafnyNameResolver.dafnyTypesNamespace(resourceOrService)
);
final var clientConversion = "&%s{Client: &%s}".formatted(shim, dataSource);
final var shim = "%swrapped.Shim".formatted(
DafnyNameResolver.dafnyNamespace(
resourceOrService.expectTrait(ServiceTrait.class)
)
);
clientConversion = "&%s{Client: &%s}".formatted(shim, dataSource);
}
if (!this.isOptional) {
return clientConversion;
} else {
Expand Down

0 comments on commit 878687e

Please sign in to comment.