szaszm commented on code in PR #1739:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1739#discussion_r1532567319
##########
libminifi/include/core/json/JsonFlowSerializer.h:
##########
@@ -26,12 +26,12 @@ class JsonFlowSerializer : public
core::flow::FlowSerializer {
explicit JsonFlowSerializer(rapidjson::Document document) :
flow_definition_json_(std::move(document)) {}
[[nodiscard]] std::string serialize(const core::ProcessGroup& process_group,
const core::flow::FlowSchema& schema, const utils::crypto::EncryptionProvider&
encryption_provider,
- const std::unordered_map<utils::Identifier,
std::unordered_map<std::string, std::string>>& overrides) const override;
+ const core::flow::Overrides& overrides) const override;
private:
void encryptSensitiveProperties(rapidjson::Value& property_jsons,
rapidjson::Document::AllocatorType& alloc,
const std::map<std::string, Property>& properties, const
utils::crypto::EncryptionProvider& encryption_provider,
- std::unordered_map<std::string, std::string> component_overrides) const;
+ const core::flow::Overrides& overrides, const utils::Identifier&
component_id) const;
Review Comment:
I was thinking of the second one, creating a new type with the component
overrides, and maybe change Overrides to map component id to this new type.
(Maybe change back to raw unordered_map?)
Adding a "required" flag to the value could work, too, to keep the
underlying type simpler. I'm not a fan of widening the dependency, but on the
other hand, this version looks simpler than the alternatives.
I've shared my thoughts, but leave the final decision to you: go with
whichever option you like the most, after considering the arguments for each
option.
--
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]