pvillard31 commented on code in PR #9759:
URL: https://github.com/apache/nifi/pull/9759#discussion_r1977847937
##########
nifi-extension-bundles/nifi-box-bundle/nifi-box-services/src/main/java/org/apache/nifi/box/controllerservices/JsonConfigBasedBoxClientService.java:
##########
@@ -60,9 +61,10 @@ public class JsonConfigBasedBoxClientService extends
AbstractControllerService i
public static final PropertyDescriptor ACCOUNT_ID = new
PropertyDescriptor.Builder()
.name("box-account-id")
.displayName("Account ID")
- .description("The ID of the Box account who owns the accessed
resource. Same as 'User Id' under 'App Info' in the App 'General Settings'.")
- .required(true)
- .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+ .description("The ID of the Box account which the app will act on
behalf of. " +
+ "If not set, the app will act as its Service Account. See
Additional Details for more information.")
+ .required(false)
+ .addValidator(Validator.VALID)
Review Comment:
I think we don't want to change the validator here as we don't want someone
to set the property with "set empty" as it would lead to
`api.asUser(accountIdProperty.getValue());` and `accountIdProperty.getValue()`
would be empty string. As soon as the property is not required, the validator
is executed only if the property is set.
--
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]