private OperationObject updateOperation(
            Context<? extends Trait> context,
            OperationShape shape,
            OperationObject operationObject,
            CorsTrait cors,
            ObjectNode integrationObject
    ) {
        ObjectNode updated = updateIntegrationWithCors(
                context,
                operationObject,
                shape,
                integrationObject,
                cors);

        return operationObject.toBuilder()
                .putExtension(AddIntegrations.INTEGRATION_EXTENSION_NAME, updated)
                .build();
    }
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