private OpenApi updateModel(Context<? extends Trait> context, OpenApi openapi, CorsTrait corsTrait) {
        // Update the existing gateway responses if present, or inject a default one if not.
        Node extension = openapi.getExtension(GATEWAY_RESPONSES_EXTENSION)
                .map(node -> node.expectObjectNode(GATEWAY_RESPONSES_EXTENSION + " must be an object"))
                .map(node -> updateGatewayResponses(context, corsTrait, node))
                .orElse(updateGatewayResponses(context, corsTrait));
        // Add the gateway responses the `x-amazon-apigateway-gateway-responses` OpenAPI extension.
        return openapi.toBuilder()
                .putExtension(GATEWAY_RESPONSES_EXTENSION, extension)
                .build();
    }
The default gateway response for 4xx and 5xx.

TODO: Does this need to be made protocol-specific?
smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToGatewayResponses.java