private void createResponsePayload(
            String mediaType,
            Context<T> context,
            HttpBinding binding,
            ResponseObject.Builder responseBuilder,
            Shape operationOrError,
            OperationShape operation
    ) {
        Objects.requireNonNull(mediaType, "Unable to determine response media type for " + operationOrError);

        // API Gateway validation requires that in-line schemas must be objects
        // or arrays. These schemas are synthesized as references so that
        // any schemas with string types will pass validation.
        Schema schema = context.inlineOrReferenceSchema(binding.getMember());
        MessageType type = !operationOrError.hasTrait(ErrorTrait.ID) ? MessageType.RESPONSE : MessageType.ERROR;
        MediaTypeObject mediaTypeObject = getMediaTypeObject(context, schema, operationOrError, shape -> {
            String shapeName = context.getService().getContextualName(shape.getId());
            return shape instanceof OperationShape
                    ? shapeName + "OutputPayload"
                    : shapeName + "ErrorPayload";
        }).toBuilder()
                .examples(createExamplesForMembersWithHttpTraits(
                        operationOrError,
                        binding,
                        type,
                        operation))
                .build();

        responseBuilder.putContent(mediaType, mediaTypeObject);
    }
Gets the media type of an event stream for the protocol.

<p>By default, this method returns the binary AWS event stream
media type, {@code application/vnd.amazon.eventstream}.

@param context Conversion context.
@param info Event stream info to provide the media type for.
@return Returns the media type of the event stream.
smithy-openapi/src/main/java/software/amazon/smithy/openapi/fromsmithy/protocols/AbstractRestProtocol.java