Github user phrocker commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/231#discussion_r160425167 --- Diff: libminifi/include/core/yaml/YamlConfiguration.h --- @@ -245,11 +245,11 @@ class YamlConfiguration : public FlowConfiguration { * * @param yamlNode a pointer to the YAML::Node that will be checked for the * presence of an idField - * @param idField the string of the name of the idField to check for. This + * @param field the string of the name of the idField to check for. This * is optional and defaults to 'id' * @return the parsed or generated UUID string */ - std::string getOrGenerateId(YAML::Node *yamlNode, const std::string &idField = "id"); + std::string getOrGenerateField(YAML::Node *yamlNode, const std::string &field = "id"); --- End diff -- I see that you added the assignment, but I don't see how we are generating fields other than ID fields with that function. In this case it is okay because name will exist at this point in the code by virtue of the checkRequiredFields call. In the case where someone else uses it, there is little to indicate other than const std::string &field = "id" that they will get a uuid field value per the conditional in getOrGenerateField. In my opinion they are getting or generating an ID in the current function, hence my confusion.
---