mosermw commented on code in PR #7922:
URL: https://github.com/apache/nifi/pull/7922#discussion_r1386907257
##########
nifi-nar-bundles/nifi-jslt-bundle/nifi-jslt-processors/src/main/java/org/apache/nifi/processors/jslt/JSLTTransformJSON.java:
##########
@@ -107,6 +110,18 @@ public class JSLTTransformJSON extends AbstractProcessor {
.defaultValue(EACH_OBJECT.getValue())
.build();
+ public static final PropertyDescriptor RESULT_FILTER = new
PropertyDescriptor.Builder()
+ .name("jslt-transform-result-filter")
+ .displayName("Transform Result Filter")
+ .description("A filter of output results using another JSLT. This
property allows you to change the built-in filter,"
+ + " which removes objects with null values, empty objects
and empty arrays from the output."
+ + " Use a filter such as \"true\" to disable all
filtering.")
+ .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+ .identifiesExternalResource(ResourceCardinality.SINGLE,
ResourceType.TEXT, ResourceType.FILE)
Review Comment:
I admit I made the new property support external resources to make the
customValidate logic simpler, and didn't think about it much after that. Since
the JSLT result filter must return true/false for each JSON object, I can't
imagine it can get complicated enough to require needing external resources. I
modified the property descriptor to make it a standard property.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]