-
Notifications
You must be signed in to change notification settings - Fork 313
Support examples in documentation #5077
Copy link
Copy link
Closed
Description
Is your feature request related to a problem? Please describe.
Right now our examples for configuration fields are embedded in the description (@JsonPropertyDescription). This makes it difficult to include multiple examples.
Describe the solution you'd like
Provide an annotation for @DataPrepperExampleValues to support providing one or more example values for a field.
For example, with the date processor:
@JsonProperty("output_format")
@JsonPropertyDescription("Determines the format of the timestamp added to an event.")
@DataPrepperExampleValues("yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
private String outputFormat = DEFAULT_OUTPUT_FORMAT;
This would produce:
"output_format" : {
"exampleValues" : [
"yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
]
"description" : "Determines the format of the timestamp added to an event."
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done