lordgamez commented on code in PR #1483:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1483#discussion_r1098616074


##########
extensions/splunk/PutSplunkHTTP.h:
##########
@@ -40,7 +40,23 @@ class PutSplunkHTTP final : public SplunkHECProcessor {
   PutSplunkHTTP& operator=(PutSplunkHTTP&&) = delete;
   ~PutSplunkHTTP() override = default;
 
-  EXTENSIONAPI static constexpr const char* Description = "Sends the flow file 
contents to the specified Splunk HTTP Event Collector over HTTP or HTTPS. 
Supports HEC Index Acknowledgement.";
+  EXTENSIONAPI static constexpr const char* Description =
+      "Sends the flow file contents to the specified Splunk HTTP Event 
Collector (see 
https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/UsetheHTTPEventCollector)
 over HTTP or HTTPS.\n"
+      "\n"
+      "The \"Source\", \"Source Type\", \"Host\" and \"Index\" properties are 
optional and will be set by Splunk if unspecified. If set,\n"

Review Comment:
   Are the `\n` endline characters necessary to wrap the descriptions? Isn't 
the wrapping done automatically in the markdown files?



##########
extensions/aws/processors/PutS3Object.h:
##########
@@ -44,7 +44,10 @@ class PutS3Object : public S3Processor {
   static const std::set<std::string> STORAGE_CLASSES;
   static const std::set<std::string> SERVER_SIDE_ENCRYPTIONS;
 
-  EXTENSIONAPI static constexpr const char* Description = "This Processor puts 
FlowFiles to an Amazon S3 Bucket.";
+  EXTENSIONAPI static constexpr const char* Description = "Puts FlowFiles to 
an Amazon S3 Bucket. The upload uses either the PutS3Object method. "

Review Comment:
   ```suggestion
     EXTENSIONAPI static constexpr const char* Description = "Puts FlowFiles to 
an Amazon S3 Bucket. The upload uses the PutS3Object method. "
   ```



##########
minifi_main/TableFormatter.h:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "core/PropertyValue.h"
+
+namespace org::apache::nifi::minifi::docs {
+
+class Table {
+ public:
+  explicit Table(std::vector<std::string> header) : header_{std::move(header)} 
{}
+  void addRow(std::vector<std::string> row);
+  [[nodiscard]] std::string toString() const;
+
+ private:
+  [[nodiscard]] std::vector<size_t> find_widths() const;

Review Comment:
   This should be camelCase



##########
minifi_main/TableFormatter.h:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "core/PropertyValue.h"
+
+namespace org::apache::nifi::minifi::docs {
+
+class Table {
+ public:
+  explicit Table(std::vector<std::string> header) : header_{std::move(header)} 
{}
+  void addRow(std::vector<std::string> row);
+  [[nodiscard]] std::string toString() const;
+
+ private:
+  [[nodiscard]] std::vector<size_t> find_widths() const;
+
+  std::vector<std::string> header_;
+  std::vector<std::vector<std::string>> rows_;
+};
+
+std::string formatName(const std::string& name, bool is_required);
+std::string formatAllowableValues(const 
std::vector<org::apache::nifi::minifi::core::PropertyValue>& values);
+std::string formatDescription(std::string description, bool 
supports_expression_language = false);
+std::string formatSeparator(const std::vector<size_t>& widths);
+std::string formatRow(const std::vector<std::string>& items, const 
std::vector<size_t>& widths);

Review Comment:
   This might benefit from a few unit tests.



-- 
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]

Reply via email to