private static Set<MediaType> supportedMediaTypes(GrpcService grpcService) {
        final ImmutableSet.Builder<MediaType> supportedMediaTypesBuilder = ImmutableSet.builder();
        supportedMediaTypesBuilder.addAll(grpcService.supportedSerializationFormats()
                                                     .stream()
                                                     .map(SerializationFormat::mediaType)::iterator);

        if (!grpcService.isFramed()) {
            if (grpcService.supportedSerializationFormats().contains(GrpcSerializationFormats.PROTO)) {
                // Normal clients of a GrpcService are not required to set a protocol when using unframed
                // requests but we set it here for clarity in DocService, where there may be multiple
                // services with similar mime types but different protocols.
                supportedMediaTypesBuilder.add(MediaType.PROTOBUF.withParameter("protocol", "gRPC"));
            }
            if (grpcService.supportedSerializationFormats().contains(GrpcSerializationFormats.JSON)) {
                supportedMediaTypesBuilder.add(MediaType.JSON_UTF_8.withParameter("protocol", "gRPC"));
            }
        }
        return supportedMediaTypesBuilder.build();
    }
{@link DocServicePlugin} implementation that supports {@link GrpcService}s.
grpc/src/main/java/com/linecorp/armeria/internal/server/grpc/GrpcDocServicePlugin.java