Skip to main content

schema.schema_text

schema.schema_text(kind)

The JSON text of the schema of kind: indent 2, a trailing newline, stable.

Parameters

Name Type Description Default
kind str "architecture", "unit" or "decision". required

Returns

Name Type Description
str str The text that babregen schema KIND prints and that the files below regen/schemas/ hold.

Raises

Name Type Description
KeyError If kind is not a record kind.

Examples

from babregen.schema import schema_text

print(schema_text("architecture")[:60])
{
  "$schema": "http://json-schema.org/draft-07/schema#",