private void addContentEncodingForByteArray(ObjectNode schema, MemberScope<?, ?> scope, SchemaGenerationContext context) {
        ResolvedType declaredType = scope.getDeclaredType();
        if (declaredType != null && declaredType.getErasedType().equals(byte[].class)) {
            schema.put("contentEncoding", "base64");
        }
    }
Example created in response to <a href="https://github.com/victools/jsonschema-generator/discussions/451">#451</a>.
<br/>
Demonstrating target type overrides to represent a {@code byte[]} as {@code string} with particular content encoding.
jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/TargetTypeOverrideExample.java