public static AdditionalPropertiesModule forMapValues() {
        ConfigFunction<TypeScope, Type> generalResolver = scope -> {
            if (scope.getType().isInstanceOf(Map.class)) {
                // within a Map<Key, Value> allow additionalProperties of the Value type
                // if no type parameters are defined, this will result in additionalProperties to be omitted (by way of returning Object.class)
                return scope.getTypeParameterFor(Map.class, 1);
            }
            return null;
        };
        return new AdditionalPropertiesModule(generalResolver,
                AdditionalPropertiesModule::createDefinitionForMemberMap,
                AdditionalPropertiesModule::createDefinitionForMemberMap);
    }
Create module instance that specifically allows additional properties on {@link Map} instances.

@return module instance
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/AdditionalPropertiesModule.java