private static String serializeExampleRequest(
            String serviceName, String methodName, Object exampleRequest) {

        if (exampleRequest instanceof CharSequence) {
            return exampleRequest.toString();
        }

        for (DocServicePlugin plugin : DocService.plugins) {
            // Skip if the plugin does not support it.
            if (plugin.supportedExampleRequestTypes().stream()
                      .noneMatch(type -> type.isInstance(exampleRequest))) {
                continue;
            }

            final String result = plugin.serializeExampleRequest(serviceName, methodName, exampleRequest);
            if (result != null) {
                return result;
            }
        }

        throw new IllegalArgumentException("could not find a plugin that can serialize: " + exampleRequest);
    }
Adds the specified {@link DescriptiveTypeInfoProvider} used to create a {@link DescriptiveTypeInfo} from
a type descriptor.
core/src/main/java/com/linecorp/armeria/server/docs/DocServiceBuilder.java