private static JsonNode createDefinitionForMemberMap(MemberScope<?, ?> member, SchemaGenerationContext context) {
        if (!member.getType().isInstanceOf(Map.class)) {
            return null;
        }
        // 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)
        ResolvedType valueType = member.getTypeParameterFor(Map.class, 1);
        if (valueType == null || valueType.getErasedType() == Object.class) {
            return null;
        }
        return member.getContext().performActionOnMember(member.asFakeContainerItemScope(Map.class, 1),
                field -> context.createStandardDefinitionReference(field, null),
                method -> context.createStandardDefinitionReference(method, null));
    }
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