docsonnet/doc-util
sh0rez 2f9dcb2d21
feat: document plain values (#12)
* feat: document plain values

Adds `d.val` to attach type and help information to plain Jsonnet
values, apart from specially treated `fn` and `obj`.

* feat: defaults
2020-07-27 16:59:04 +02:00
..
main.libsonnet feat: document plain values (#12) 2020-07-27 16:59:04 +02:00
README.md feat: document plain values (#12) 2020-07-27 16:59:04 +02:00

permalink
/

package d

local d = import "github.com/sh0rez/docsonnet/doc-util"

doc-util provides a Jsonnet interface for docsonnet, a Jsonnet API doc generator that uses structured data instead of comments.

Index

Fields

fn arg

arg(name, type, default)

arg is a shorthand for argument.new

fn fn

fn(help, args)

fn is a shorthand for func.new

fn obj

obj(help, fields)

obj is a shorthand for object.new

fn pkg

pkg(name, url, help)

new is a shorthand for package.new

fn val

val(type, help, default)

val is a shorthand for value.new

obj argument

Utilities for creating function arguments

fn argument.new

new(name, type, default)

new creates a new function argument, taking the name, the type and optionally a default value

obj func

Utilities for documenting Jsonnet methods (functions of objects)

fn func.new

new(help, args)

new creates a new function, optionally with description and arguments

fn func.withArgs

withArgs(args)

The withArgs modifier overrides the arguments of that function

fn func.withHelp

withHelp(help)

The withHelp modifier overrides the help text of that function

obj object

Utilities for documenting Jsonnet objects ({ }).

fn object.new

new(help, fields)

new creates a new object, optionally with description and fields

fn object.withFields

withFields(fields)

The withFields modifier overrides the fields property of an already created object

obj package

fn package.new

new(name, url, help)

new creates a new package with given name, import URL and help text

obj value

Utilities for documenting plain Jsonnet values (primitives)

fn value.new

new(type, help, default)

new creates a new object of given type, optionally with description and default value