public CustomPropertyDefinition provideCustomPropertySchemaDefinition(MemberScope<?, ?> scope, SchemaGenerationContext context) {
        return this.getIdentityReferenceType(scope)
                .map(context::createDefinitionReference)
                .map(CustomPropertyDefinition::new)
                .orElse(null);
    }
Implementation of the {@code CustomPropertyDefinitionProvider} interface that can be used for both fields and methods.

@param scope field/method on which to check for the {@code @JsonIdentityReference} annotation
@param context generation context enabling the standard schema generation for the identity property's value type
@return created custom definition (may be {@code null})
jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonIdentityReferenceDefinitionProvider.java