From 5338cfd2a4d492b2b23737433b03eeb5673d9e09 Mon Sep 17 00:00:00 2001 From: Elyes Cherfa Date: Tue, 22 Oct 2024 14:57:33 +0200 Subject: [PATCH] Issue #63: Display the new additional connectors configuration * Changed the additional connectors display format. * Tested on MetricsHub doc --- .../connector/producer/ConnectorPageProducer.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java b/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java index 85d0e0b..2142e1e 100644 --- a/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java +++ b/src/main/java/org/sentrysoftware/maven/metricshub/connector/producer/ConnectorPageProducer.java @@ -539,12 +539,14 @@ private void produceMetricsHubExamplesContent( // Connector variable if (connectorVariables != null && !connectorVariables.isEmpty()) { + yamlBuilder.append(" additionalConnectors:\n"); - yamlBuilder.append(" :\n"); + yamlBuilder.append(" " + connectorId); + yamlBuilder.append(": # Unique ID. Use 'uses' if different from the original connector ID\n"); yamlBuilder.append(" uses: " + connectorId); - yamlBuilder.append(" # Id of connector to use\n"); - yamlBuilder.append(" force: true/false"); - yamlBuilder.append(" # true by default\n"); + yamlBuilder.append(" # Optional - Original ID if not in key\n"); + yamlBuilder.append(" force: true"); + yamlBuilder.append(" # Optional (default: true); false for auto-detection only\n"); yamlBuilder.append(" variables:\n"); connectorVariables .iterator()