Skip to main content
Definition defines properties of a key, code, or other value that has a specific meaning or utility.

Schema ID

https://gobl.org/draft-0/cbc/definition

Properties

TitlePropertyTypeDescription
Keykeycbc.KeyKey being defined.
Codecodecbc.CodeCode this definition represents.
Namenamei18n.StringShort name for the key.
Descriptiondesci18n.StringDescription offering more details about when the key should be used.
Metametacbc.MetaMeta defines any additional details that may be useful or associated with the key.
Sourcessourcesarray of cbc.SourceWhere the information was sourced from and where it can be reviewed for updates in the future.
Valuesvaluesarray of cbc.DefinitionValues defines the possible values associated with the key, which themselves will either be keys or codes depending on the context.
PatternpatternstringPattern is used to validate the key value instead of using a fixed value from the code or key definitions.
Code Mapmapcbc.CodeMapMap helps map local keys to specific codes, useful for converting the described key into a local code.

Validation Rules

FieldTestValidation Code / Message
Definition
  • String(Code) != ” || string(Key) != ”
GOBL-CBC-DEFINITION-02
Definition must have either a key or a code, and not both
name
  • Present
GOBL-CBC-DEFINITION-01
Name is required
pattern
  • Is a regexp
GOBL-CBC-DEFINITION-03
Pattern must be a valid regular expression