-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #59: Display the connector variables #61
base: main
Are you sure you want to change the base?
Issue #59: Display the connector variables #61
Conversation
* Added a `variables` section under the `prerequisites` in the connectors pages to display the connector template variables, their description & their default value if available. * Tested on metricshub-doc.
* Updated MetricsHub example content producer to add variables configuration example. * Tested the results
* Resolved merge conflict.
I would simplify the listing of variables like below: Variables:
So the "template" is like: <li> <code>VARNAME</code>: VARDESCRIPTION (default: <code>DEFAULTVALUE</code>) Description and default value should be displayed in the doc only if they are specified, like below:
|
Now an interesting question: how do we specify variable values for a connector through the CLI? 😅 |
There is a plan for this @bertysentry sentrysoftware/metricshub#357... indeed, we still require a spec. |
final String variableRegex = "\\$\\{var::(.*?)\\}"; | ||
final Set<String> variables = new HashSet<>(); | ||
|
||
final Pattern pattern = Pattern.compile(variableRegex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a constant please.
@@ -0,0 +1,42 @@ | |||
package org.sentrysoftware.maven.metricshub.connector.producer.model.common; | |||
|
|||
import lombok.AllArgsConstructor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be under the ╱╲╱╲╱╲
header comment.
variables
section under theprerequisites
in the connectors pages to display the connector template variables, their description & their default value if available.Tests
Default connector variables specified.
Default connector variables not specified (variables are present).
MetricsHub.yaml example