Skip to content

Commit fc27b14

Browse files
authored
feat: Add description to time JSONschema (#2083)
When generating table docs with table options, the new description will be used
1 parent 14ad9db commit fc27b14

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

configtype/time.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ func (Time) JSONSchema() *jsonschema.Schema {
8686
Type: "string",
8787
Pattern: timePattern,
8888
Title: "CloudQuery configtype.Time",
89+
Description: "Allows for defining timestamps in both absolute(RFC3339) and relative formats. " +
90+
"Absolute timestamp example: `2024-01-01T12:00:00+00:00`.\n" +
91+
"Relative timestamps can take this format:\n" +
92+
"- `now`\n" +
93+
"- `x seconds [ago|from now]`\n" +
94+
"- `x minutes [ago|from now]`\n" +
95+
"- `x hours [ago|from now]`\n" +
96+
"- `x days [ago|from now]`\n" +
97+
"`until` field usage:\n" +
98+
"- `until: now`\n" +
99+
"- `until: 2 days ago`\n" +
100+
"- `until: 10 months 3 days 4h20m from now`\n" +
101+
"- `until: 2024-01-01T12:00:00+00:00`",
89102
}
90103
}
91104

0 commit comments

Comments
 (0)