You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc-util/main.libsonnet
+38-7Lines changed: 38 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -73,37 +73,68 @@
73
73
'#arg': self.argument['#new'] + self.func.withHelp('`arg` is a shorthand for `argument.new`'),
74
74
arg::self.argument.new,
75
75
76
-
"#value": d.obj("Utilities for documenting plain Jsonnet values (primitives)"),
76
+
'#value': d.obj('Utilities for documenting plain Jsonnet values (primitives)'),
77
77
value:: {
78
-
"#new": d.fn("new creates a new object of given type, optionally with description and default value", [d.arg("type", d.T.string), d.arg("help", d.T.string), d.arg("default", d.T.any)]),
79
-
new(type, help='', default=null): { 'value': {
78
+
'#new': d.fn('new creates a new object of given type, optionally with description and default value', [d.arg('type', d.T.string), d.arg('help', d.T.string), d.arg('default', d.T.any)]),
79
+
new(type, help='', default=null): { value: {
80
80
help: help,
81
81
type: type,
82
82
default: default,
83
-
} }
83
+
} },
84
84
},
85
85
'#val': self.value['#new'] + self.func.withHelp('`val` is a shorthand for `value.new`'),
86
-
val:self.value.new,
86
+
val::self.value.new,
87
87
88
88
// T contains constants for the Jsonnet types
89
89
T:: {
90
+
'#string': d.val(d.T.string, 'argument of type "string"'),
90
91
string:'string',
91
92
93
+
'#number': d.val(d.T.string, 'argument of type "number"'),
92
94
number:'number',
93
95
int:self.number,
94
96
integer:self.number,
95
97
98
+
'#boolean': d.val(d.T.string, 'argument of type "boolean"'),
96
99
boolean:'bool',
97
100
bool:self.boolean,
98
101
102
+
'#object': d.val(d.T.string, 'argument of type "object"'),
99
103
object:'object',
104
+
105
+
'#array': d.val(d.T.string, 'argument of type "array"'),
100
106
array:'array',
107
+
108
+
'#any': d.val(d.T.string, 'argument of type "any"'),
101
109
any:'any',
102
110
103
-
'null': "null",
104
-
nil:self["null"],
111
+
'#null': d.val(d.T.string, 'argument of type "null"'),
112
+
'null': 'null',
113
+
nil:self['null'],
105
114
115
+
'#func': d.val(d.T.string, 'argument of type "func"'),
106
116
func:'function',
107
117
'function': self.func,
108
118
},
119
+
120
+
'#render': d.fn(
121
+
|||
122
+
`render` converts the docstrings to human readable Markdown files.
0 commit comments