Skip to content
Legislation
Esc
navigateopen⌘Jpreview

Legislation · public publication pilot

consumer-nodes: 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": "canonicalPath",
    "mechanicalInputs": "slug, version date, artifact path, and structural path",
    "stabilityRule": "stable-while-structural-inputs-stable",
    "uniquenessScope": "slug-version"
  },
  {
    "identifierName": "markdownDigest",
    "mechanicalInputs": "sha256 digest of the governed file or text bytes",
    "stabilityRule": "content-addressed",
    "uniquenessScope": "artifact-family"
  },
  {
    "identifierName": "slug",
    "mechanicalInputs": "source descriptor slug",
    "stabilityRule": "stable-while-source-descriptor-stable",
    "uniquenessScope": "dataset"
  },
  {
    "identifierName": "slugFingerprintDigest",
    "mechanicalInputs": "sha256 digest of the governed file or text bytes",
    "stabilityRule": "content-addressed",
    "uniquenessScope": "artifact-family"
  }
]

Fields (23)

VariantFieldRequiredPublished constraints
CommonartifactKindYes
{
  "enum": [
    "file",
    "directory-index",
    "document-frontmatter",
    "document-contents",
    "document-preamble"
  ],
  "type": "string"
}
CommonartifactRelativePathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+\\.md$"
    }
  ],
  "type": "string"
}
CommoncanonicalPathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
    }
  ],
  "type": "string"
}
CommoncontentBlockEndExclusiveYes
{
  "type": "integer"
}
CommoncontentBlockStartIndexYes
{
  "type": "integer"
}
CommondocumentOrderYes
{
  "type": "integer"
}
CommonheadingBlockIndexYes
{
  "type": "integer"
}
CommonheadingTextYes
{
  "type": "string"
}
CommonheadingTrailYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommonmarkdownYes
{
  "type": "string"
}
CommonmarkdownDigestYes
{
  "allOf": [
    {
      "pattern": "^[0-9a-f]{64}$"
    }
  ],
  "type": "string"
}
CommonmarkdownDigestAlgorithmYes
{
  "enum": [
    "sha256"
  ],
  "type": "string"
}
CommonnameYes
{
  "type": "string"
}
CommonschemaVersionYes
{
  "type": "string"
}
CommonslugYes
{
  "allOf": [
    {
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
    }
  ],
  "type": "string"
}
CommonslugFingerprintDigestYes
{
  "allOf": [
    {
      "pattern": "^[0-9a-f]{64}$"
    }
  ],
  "type": "string"
}
CommonsourceDocumentPathYes
{
  "type": "string"
}
CommonsourceIndexKindYes
{
  "enum": [
    "body-block",
    "body-div"
  ],
  "type": "string"
}
CommonsourceTextUrlYes
{
  "allOf": [
    {
      "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
    }
  ],
  "type": "string"
}
CommonstructuralPathYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommonsubstantiveBlockCountYes
{
  "type": "integer"
}
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": {
    "artifactKind": {
      "enum": [
        "file",
        "directory-index",
        "document-frontmatter",
        "document-contents",
        "document-preamble"
      ],
      "type": "string"
    },
    "artifactRelativePath": {
      "allOf": [
        {
          "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+\\.md$"
        }
      ],
      "type": "string"
    },
    "canonicalPath": {
      "allOf": [
        {
          "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
        }
      ],
      "type": "string"
    },
    "contentBlockEndExclusive": {
      "type": "integer"
    },
    "contentBlockStartIndex": {
      "type": "integer"
    },
    "documentOrder": {
      "type": "integer"
    },
    "headingBlockIndex": {
      "type": "integer"
    },
    "headingText": {
      "type": "string"
    },
    "headingTrail": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "markdown": {
      "type": "string"
    },
    "markdownDigest": {
      "allOf": [
        {
          "pattern": "^[0-9a-f]{64}$"
        }
      ],
      "type": "string"
    },
    "markdownDigestAlgorithm": {
      "enum": [
        "sha256"
      ],
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "schemaVersion": {
      "type": "string"
    },
    "slug": {
      "allOf": [
        {
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      ],
      "type": "string"
    },
    "slugFingerprintDigest": {
      "allOf": [
        {
          "pattern": "^[0-9a-f]{64}$"
        }
      ],
      "type": "string"
    },
    "sourceDocumentPath": {
      "type": "string"
    },
    "sourceIndexKind": {
      "enum": [
        "body-block",
        "body-div"
      ],
      "type": "string"
    },
    "sourceTextUrl": {
      "allOf": [
        {
          "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
        }
      ],
      "type": "string"
    },
    "structuralPath": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "substantiveBlockCount": {
      "type": "integer"
    },
    "titleId": {
      "type": "string"
    },
    "versionDate": {
      "allOf": [
        {
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
        }
      ],
      "type": "string"
    }
  },
  "required": [
    "schemaVersion",
    "slug",
    "titleId",
    "name",
    "versionDate",
    "sourceTextUrl",
    "canonicalPath",
    "artifactRelativePath",
    "artifactKind",
    "structuralPath",
    "headingTrail",
    "headingText",
    "documentOrder",
    "sourceDocumentPath",
    "sourceIndexKind",
    "headingBlockIndex",
    "contentBlockStartIndex",
    "contentBlockEndExclusive",
    "substantiveBlockCount",
    "markdown",
    "markdownDigestAlgorithm",
    "markdownDigest",
    "slugFingerprintDigest"
  ],
  "type": "object",
  "x-legislation": {
    "artifactFamilyKey": "consumer-nodes",
    "artifactPathPattern": ".tooling/consumer-nodes/<slug>.jsonl",
    "derivationMode": "effect-derived",
    "schemaPath": ".tooling/schemas/consumer-nodes.schema.json",
    "schemaVersion": "1.0.0",
    "shapeKind": "encoded-jsonl-record",
    "sourceEffectExport": "ConsumerNodeRecordJson",
    "sourceEffectModule": "src/domain/consumerSurface.ts"
  }
}

a6de85cccf489b7b121dcec0cddf38c459fff4af3f64d1bc4fde69b4753ec0c5