@Override
    public OperationObject updateOperation(
            Context<? extends Trait> context,
            OperationShape shape,
            OperationObject operationObject,
            String httpMethod,
            String path
    ) {
        CorsTrait cors = context.getService().getTrait(CorsTrait.class).orElse(null);

        if (cors == null) {
            return operationObject;
        }

        return operationObject.getExtension(AddIntegrations.INTEGRATION_EXTENSION_NAME)
                .flatMap(Node::asObjectNode)
                .map(integrationObject -> updateOperation(context, shape, operationObject, cors, integrationObject))
                .orElse(operationObject);
    }
Adds CORS headers to REST integrations.

<p>If the service is a REST API that has the {@link CorsTrait}, then
integration responses will include a statically computed
Access-Control-Expose-Headers CORS headers that contains every header
exposed by the integration, and Access-Control-Allow-Credentials header
if the operation uses a security scheme that needs it, and
Access-Control-Allow-Origin header that is the result of
{@link CorsTrait#getOrigin()}.
smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToRestIntegrations.java