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 12b4e6d..2fad27c 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,11 +539,18 @@ private void produceMetricsHubExamplesContent( // Connector variable if (connectorVariables != null && !connectorVariables.isEmpty()) { - yamlBuilder.append(" variables:\n"); + yamlBuilder.append(" additionalConnectors:\n"); + yamlBuilder.append(" " + connectorId); + yamlBuilder.append(": # Unique ID. Use 'uses' if different from the original connector ID\n"); + yamlBuilder.append(" uses: " + connectorId); + 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() .forEachRemaining(variable -> { - yamlBuilder.append(String.format(" %s: %s", variable, "")); + yamlBuilder.append(String.format(" %s: %s", variable, "")); yamlBuilder.append(" # Replace with desired value.\n"); }); }