Skip to main content

Documentation

A Documentation variable holds documentation for an item or a service: markdown content, JSON with a template to render it, or a link to a web page. It is saved with the documentation service.

Construction​

FunctionDescription
Documentation()Creates a new default documentation configuration
DocumentationLink(url)Creates a new documentation URL Link configuration
DocumentationLink(url, selector)Creates a new documentation URL Link configuration

Properties​

NameDescriptionType
contentThe markdown content of this documentationString
documentationTypeThe type of this documentation, one of Default, JSON or LinkString
entityThe entity or id this documentation is forString
jsonJSON content - only use if this is a JSON typeObject
languageThe language of this documentation (optional - default to English en)String
nameThe name of this documentationString
scopeThe scope or service this documentation is forString
selectorThe optional selector used with the Web URL to select part of a web page - only if this is a link typeString
tagsTags for this documentationList
templateTemplate to convert JSON to HTML - only use if this is a JSON typeString
urlThe Web URL of this documentation - only if this is a link typeString

Example​

doc = Documentation()
doc.entity = "NGE.GAS.TTF"
doc.scope = "object"
doc.name = "TTF gas prices"
doc.content = "## TTF\nSettlement prices for the Dutch TTF gas hub."
save ${documentation:doc}