private <M extends MemberScope<?, ?>> JsonNode createMemberSchemaWithMultipleOptions(List<M> memberOptions, boolean isNullable,
            Function<MemberDetails<M>, JsonNode> createMemberSchema) {
        ObjectNode subSchema = this.generatorConfig.createObjectNode();
        ArrayNode anyOfArray = subSchema.withArray(this.getKeyword(SchemaKeyword.TAG_ANYOF));
        if (isNullable) {
            anyOfArray.addObject()
                    .put(this.getKeyword(SchemaKeyword.TAG_TYPE), this.getKeyword(SchemaKeyword.TAG_TYPE_NULL));
        }
        memberOptions.stream()
                .map(option -> new MemberDetails<>(option, false, false, null))
                .map(createMemberSchema)
                .forEach(anyOfArray::add);
        return subSchema;
    }
Preparation Step: create a node for a schema representing the given field's associated value type.

@param field field/property to populate the schema node for
@return schema node representing the given field/property
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImpl.java