private static ObjectNode createIntegration(
            Context<? extends Trait> context,
            OperationShape shape,
            Trait integration
    ) {
        ObjectNode integrationNode;
        if (integration instanceof MockIntegrationTrait) {
            integrationNode = integration.toNode().expectObjectNode().withMember("type", Node.from("mock"));
        } else if (integration instanceof IntegrationTrait) {
            validateTraitConfiguration((IntegrationTrait) integration, context, shape);
            integrationNode = ((IntegrationTrait) integration).toExpandedNode(context.getService(), shape);
        } else {
            throw new OpenApiException("Unexpected integration trait: " + integration);
        }

        // Fix a naming issue where the Smithy trait uses a different casing for "passthroughBehavior"
        Optional<Node> passthroughBehavior = integrationNode.getMember(INCORRECT_PASSTHROUGH_BEHAVIOR);
        if (passthroughBehavior.isPresent()) {
            integrationNode = integrationNode
                    .withoutMember(INCORRECT_PASSTHROUGH_BEHAVIOR)
                    .withMember(PASSTHROUGH_BEHAVIOR, passthroughBehavior.get());
        }
        return integrationNode;
    }
Adds API Gateway integrations to operations.
smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddIntegrations.java