[ https://issues.apache.org/jira/browse/MINIFI-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15997261#comment-15997261 ]
ASF subversion and git services commented on MINIFI-294: -------------------------------------------------------- Commit 8958496bf785f37311fb383055276d5e8518b6da in nifi-minifi-cpp's branch refs/heads/master from [~kdoran] [ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8958496 ] MINIFI-294 Required vs. optional fields in config YAML Long description of the changes in this commit can be found in the JIRA for MINFI-294. Basically, better checks are now in place and in the case of missing required fields, better error messaging. This builds upon improvements made in MINIFI-275, and also updates the config.yml exampe in the README.md file to match the code. This closes #90. Signed-off-by: Aldrin Piri <ald...@apache.org> > Better handling of required vs. optional fields in config schema v1 > ------------------------------------------------------------------- > > Key: MINIFI-294 > URL: https://issues.apache.org/jira/browse/MINIFI-294 > Project: Apache NiFi MiNiFi > Issue Type: Bug > Components: C++, Documentation, Processing Configuration > Reporter: Kevin Doran > Assignee: Kevin Doran > Priority: Critical > Fix For: cpp-0.2.0 > > > This is a followup task to MINIFI-275. While the scope of MINIFI-275 was > minifi-cpp processing of components without id fields, which are optional in > config schema v1, this ticket covers all fields for all component types, > either doing string checks for required fields (with useful error messages if > absent) or graceful handling of missing optional fields. > The Config Schema V1 in the minifi-java codebase will be used as a guide for > which fields to treat as required and which to treat as optional. [~aldrin] - > please confirm that is the correct assumption for minifi-cpp. The Java > implementation can be found at [1]. Specifically, in the Java code, required > fields are loaded using `getRequiredKeyAsType() and optional fields are > loaded using `getOptionalKeyAsType()` > Also in scope for this ticket is to update the config.yml examples in the > minifi-cpp README.md file to make sure they are not missing required fields. > During testing, it was found that one example config.yml is missing source > name and destination name, which are required in config schema v1. > [1] > https://github.com/apache/nifi-minifi/tree/master/minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v1 -- This message was sent by Atlassian JIRA (v6.3.15#6346)