Skip to content
Legislation
Esc
navigateopen⌘Jpreview

Legislation · public publication pilot

definitions: schema and stability

Generated reference for this publication’s exact JSON Schema sidecar. Field constraints below come directly from the sidecar; JSON Schema does not reproduce every Effect refinement.

Published stability metadata

Schema version
1.0.0
Digest meaning
exact-file-bytes
Empty file meaning
valid-empty-file
Additive changes
enum-value-added, field-added, record-added
Breaking changes
contract-digest-changed, digest-framing-changed, enum-value-removed, field-removed, path-pattern-changed, record-changed, record-removed, schema-digest-changed
Identifier stability rules
[
  {
    "identifierName": "slug",
    "mechanicalInputs": "source descriptor slug",
    "stabilityRule": "stable-while-source-descriptor-stable",
    "uniquenessScope": "dataset"
  },
  {
    "identifierName": "sourceCanonicalPath",
    "mechanicalInputs": "slug, version date, artifact path, and structural path",
    "stabilityRule": "stable-while-structural-inputs-stable",
    "uniquenessScope": "slug-version"
  }
]

Fields (25)

VariantFieldRequiredPublished constraints
CommonbodyKindYes
{
  "enum": [
    "substantive",
    "reference-pointer"
  ],
  "type": "string"
}
CommondefinitionBodyTextYes
{
  "type": "string"
}
CommondefinitionHeadTextYes
{
  "type": "string"
}
CommondefinitionSpanTextYes
{
  "type": "string"
}
CommonformulaClassYes
{
  "enum": [
    "means",
    "includes",
    "has-meaning-given",
    "has-same-meaning",
    "reference-to-means",
    "subject-copula",
    "operational-colon-gloss"
  ],
  "type": "string"
}
CommonnameYes
{
  "type": "string"
}
CommonschemaVersionYes
{
  "type": "string"
}
CommonscopeDisclosureKindYes
{
  "enum": [
    "slug-global",
    "source",
    "chapter",
    "part",
    "division",
    "subdivision",
    "schedule",
    "section",
    "subsection",
    "paragraph",
    "subparagraph"
  ],
  "type": "string"
}
CommonscopeTextNo
{
  "type": "string"
}
CommonslugYes
{
  "allOf": [
    {
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
    }
  ],
  "type": "string"
}
CommonsourceArtifactKindYes
{
  "enum": [
    "file",
    "directory-index",
    "document-frontmatter",
    "document-contents",
    "document-preamble"
  ],
  "type": "string"
}
CommonsourceArtifactRelativePathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+\\.md$"
    }
  ],
  "type": "string"
}
CommonsourceCanonicalPathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
    }
  ],
  "type": "string"
}
CommonsourceContentBlockEndExclusiveYes
{
  "type": "integer"
}
CommonsourceContentBlockStartIndexYes
{
  "type": "integer"
}
CommonsourceDocumentOrderYes
{
  "type": "integer"
}
CommonsourceHeadingBlockIndexYes
{
  "type": "integer"
}
CommonsourceHeadingTextYes
{
  "type": "string"
}
CommonsourceHeadingTrailYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommonsourceLineEndYes
{
  "type": "integer"
}
CommonsourceLineStartYes
{
  "type": "integer"
}
CommonsourceStructuralPathYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommonsourceTextUrlYes
{
  "allOf": [
    {
      "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
    }
  ],
  "type": "string"
}
CommontitleIdYes
{
  "type": "string"
}
CommonversionDateYes
{
  "allOf": [
    {
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
    }
  ],
  "type": "string"
}
Complete JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "bodyKind": {
      "enum": [
        "substantive",
        "reference-pointer"
      ],
      "type": "string"
    },
    "definitionBodyText": {
      "type": "string"
    },
    "definitionHeadText": {
      "type": "string"
    },
    "definitionSpanText": {
      "type": "string"
    },
    "formulaClass": {
      "enum": [
        "means",
        "includes",
        "has-meaning-given",
        "has-same-meaning",
        "reference-to-means",
        "subject-copula",
        "operational-colon-gloss"
      ],
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "schemaVersion": {
      "type": "string"
    },
    "scopeDisclosureKind": {
      "enum": [
        "slug-global",
        "source",
        "chapter",
        "part",
        "division",
        "subdivision",
        "schedule",
        "section",
        "subsection",
        "paragraph",
        "subparagraph"
      ],
      "type": "string"
    },
    "scopeText": {
      "type": "string"
    },
    "slug": {
      "allOf": [
        {
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      ],
      "type": "string"
    },
    "sourceArtifactKind": {
      "enum": [
        "file",
        "directory-index",
        "document-frontmatter",
        "document-contents",
        "document-preamble"
      ],
      "type": "string"
    },
    "sourceArtifactRelativePath": {
      "allOf": [
        {
          "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+\\.md$"
        }
      ],
      "type": "string"
    },
    "sourceCanonicalPath": {
      "allOf": [
        {
          "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
        }
      ],
      "type": "string"
    },
    "sourceContentBlockEndExclusive": {
      "type": "integer"
    },
    "sourceContentBlockStartIndex": {
      "type": "integer"
    },
    "sourceDocumentOrder": {
      "type": "integer"
    },
    "sourceHeadingBlockIndex": {
      "type": "integer"
    },
    "sourceHeadingText": {
      "type": "string"
    },
    "sourceHeadingTrail": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "sourceLineEnd": {
      "type": "integer"
    },
    "sourceLineStart": {
      "type": "integer"
    },
    "sourceStructuralPath": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "sourceTextUrl": {
      "allOf": [
        {
          "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
        }
      ],
      "type": "string"
    },
    "titleId": {
      "type": "string"
    },
    "versionDate": {
      "allOf": [
        {
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
        }
      ],
      "type": "string"
    }
  },
  "required": [
    "schemaVersion",
    "slug",
    "titleId",
    "name",
    "versionDate",
    "sourceTextUrl",
    "sourceCanonicalPath",
    "sourceArtifactRelativePath",
    "sourceArtifactKind",
    "sourceStructuralPath",
    "sourceHeadingTrail",
    "sourceHeadingText",
    "sourceDocumentOrder",
    "sourceLineStart",
    "sourceLineEnd",
    "sourceHeadingBlockIndex",
    "sourceContentBlockStartIndex",
    "sourceContentBlockEndExclusive",
    "definitionSpanText",
    "definitionHeadText",
    "definitionBodyText",
    "formulaClass",
    "scopeDisclosureKind",
    "bodyKind"
  ],
  "type": "object",
  "x-legislation": {
    "artifactFamilyKey": "definitions",
    "artifactPathPattern": ".tooling/definitions/<slug>.jsonl",
    "derivationMode": "effect-derived",
    "schemaPath": ".tooling/schemas/definitions.schema.json",
    "schemaVersion": "1.0.0",
    "shapeKind": "encoded-jsonl-record",
    "sourceEffectExport": "DefinitionRecordJson",
    "sourceEffectModule": "src/domain/definition.ts"
  }
}

a6de85cccf489b7b121dcec0cddf38c459fff4af3f64d1bc4fde69b4753ec0c5