We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
T.uuid()
T.date().{timeOnly,dateOnly}()
1 parent 9744e6c commit 41e3e3fCopy full SHA for 41e3e3f
packages/code-gen/src/processors/doc-string.js
@@ -20,6 +20,19 @@ export function docStringCleanup(generateContext) {
20
21
type.docString = normalizeIndentationAndTrim(src);
22
23
+ if (type.docString.trim().length === 0) {
24
+ // Add default patterns to the doc string.
25
+ if (type.type === "date") {
26
+ if (type.specifier === "dateOnly") {
27
+ type.docString = `Expected pattern: yyyy-MM-dd`;
28
+ } else if (type.specifier === "timeOnly") {
29
+ type.docString = `Expected pattern: HH:mm(:ss(.SSS))`;
30
+ }
31
+ } else if (type.type === "uuid") {
32
+ type.docString += `Expected pattern: UUID (v4)`;
33
34
35
+
36
callback(type);
37
}
38
},
0 commit comments