private Stream<String> supportedMediaTypes(Context<? extends Trait> context) {
        Model model = context.getModel();
        HttpBindingIndex httpBindingIndex = HttpBindingIndex.of(context.getModel());
        TopDownIndex topDownIndex = TopDownIndex.of(context.getModel());

        // Find the media types defined on all request and response bindings.
        return topDownIndex.getContainedOperations(context.getService())
                .stream()
                .flatMap(operation -> Stream.concat(
                        OptionalUtils.stream(
                                binaryMediaType(model, httpBindingIndex.getRequestBindings(operation))),
                        OptionalUtils.stream(
                                binaryMediaType(model, httpBindingIndex.getResponseBindings(operation)))));
    }
Adds API Gateway binary media types as a top-level key in the OpenAPI model
named {@code x-amazon-apigateway-binary-media-types}.

<p>This data is used by API Gateway to determine which content-types do
not contain UTF-8 data.
smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddBinaryTypes.java