private List<String> collectImpliedTypes(ObjectNode schemaNode, String typeTagName, Map<String, SchemaKeyword> reverseTagMap) {
        if (schemaNode.has(typeTagName)) {
            // explicit type indication is already present
            return Collections.emptyList();
        }
        return reverseTagMap.entrySet().stream()
                .filter(entry -> schemaNode.has(entry.getKey()))
                .flatMap(entry -> entry.getValue().getImpliedTypes().stream())
                .distinct()
                .sorted()
                .map(SchemaKeyword.SchemaType::getSchemaKeywordValue)
                .collect(Collectors.toList());
    }
Add the {@link SchemaKeyword#TAG_TYPE} where it is missing and it can be implied from other present tags.

@param schemaNode sub-schema to check and extend, if required and possible
@param typeTagName name of the "type" tag
@param considerNullType whether to always include "null" as possible "type" in addition to the implied values
@param reverseTagMap mapping from tag name in the produced schema to their corresponding {@link SchemaKeyword} value
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaCleanUpUtils.java