Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-karanjit committed Jan 17, 2025
1 parent f495419 commit 05be666
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,20 @@ void generateReferencedResources(final GenerationContext context) {
) {
continue;
}
model.expectShape(resource, ResourceShape.class).getOperations()
.forEach(operation -> {
final var operationShape = model.expectShape(
operation,
OperationShape.class
);
var inputShape = operationShape.getInput().isPresent() ? context.model().expectShape(operationShape.getInput().orElseThrow()).asStructureShape().orElseThrow() : null;
var outputShape = operationShape.getOutput().isPresent() ? context.model().expectShape(operationShape.getOutput().orElseThrow()).asStructureShape().orElseThrow() : null;
var directedCodegen = new DafnyLocalServiceDirectedCodegen();
if (inputShape != null)
directedCodegen.writeStructure(context, inputShape);
if (outputShape != null)
directedCodegen.writeStructure(context, outputShape);
});
writerDelegator.useFileWriter(
"%s/types.go".formatted(
SmithyNameResolver.smithyTypesNamespace(service)
Expand Down

0 comments on commit 05be666

Please sign in to comment.