Skip to content
Legislation
Esc
navigateopen⌘Jpreview

Legislation · public publication pilot

citation-targets: 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": "citationAddress",
    "mechanicalInputs": "slug, targetKind, source path coordinates, and local coordinate",
    "stabilityRule": "stable-while-structural-inputs-stable",
    "uniquenessScope": "dataset"
  },
  {
    "identifierName": "citationAddress",
    "mechanicalInputs": "slug, targetKind, source path coordinates, and local coordinate",
    "stabilityRule": "stable-while-structural-inputs-stable",
    "uniquenessScope": "dataset"
  },
  {
    "identifierName": "citationTargetId",
    "mechanicalInputs": "dataset digest and citationAddress",
    "stabilityRule": "version-scoped",
    "uniquenessScope": "dataset"
  },
  {
    "identifierName": "datasetDigest",
    "mechanicalInputs": "dataset lock manifest datasetDigest",
    "stabilityRule": "content-addressed",
    "uniquenessScope": "dataset"
  },
  {
    "identifierName": "textDigest",
    "mechanicalInputs": "sha256 digest of the governed file or text bytes",
    "stabilityRule": "content-addressed",
    "uniquenessScope": "artifact-family"
  }
]

Fields (43)

VariantFieldRequiredPublished constraints
anyOf 1artifactRelativePathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+\\.md$"
    }
  ],
  "type": "string"
}
anyOf 1canonicalPathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
    }
  ],
  "type": "string"
}
anyOf 1citationAddressYes
{
  "type": "string"
}
anyOf 1citationTargetIdYes
{
  "type": "string"
}
anyOf 1datasetDigestYes
{
  "allOf": [
    {
      "pattern": "^[0-9a-f]{64}$"
    }
  ],
  "type": "string"
}
anyOf 1documentOrderYes
{
  "type": "integer"
}
anyOf 1headingTextYes
{
  "type": "string"
}
anyOf 1headingTrailYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
anyOf 1markdownYes
{
  "type": "string"
}
anyOf 1nameYes
{
  "type": "string"
}
anyOf 1schemaVersionYes
{
  "type": "string"
}
anyOf 1slugYes
{
  "allOf": [
    {
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
    }
  ],
  "type": "string"
}
anyOf 1sourceArtifactBlockEndExclusiveYes
{
  "type": "integer"
}
anyOf 1sourceArtifactBlockStartIndexYes
{
  "type": "integer"
}
anyOf 1sourceArtifactKindYes
{
  "enum": [
    "file",
    "directory-index",
    "document-frontmatter",
    "document-contents",
    "document-preamble"
  ],
  "type": "string"
}
anyOf 1sourceDocumentPathYes
{
  "type": "string"
}
anyOf 1sourceIndexKindYes
{
  "enum": [
    "body-block",
    "body-div"
  ],
  "type": "string"
}
anyOf 1sourceTextUrlYes
{
  "allOf": [
    {
      "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
    }
  ],
  "type": "string"
}
anyOf 1structuralPathYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
anyOf 1targetKindYes
{
  "enum": [
    "markdown-artifact"
  ],
  "type": "string"
}
anyOf 1textDigestYes
{
  "allOf": [
    {
      "pattern": "^[0-9a-f]{64}$"
    }
  ],
  "type": "string"
}
anyOf 1textDigestAlgorithmYes
{
  "enum": [
    "sha256"
  ],
  "type": "string"
}
anyOf 1titleIdYes
{
  "type": "string"
}
anyOf 1versionDateYes
{
  "allOf": [
    {
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
    }
  ],
  "type": "string"
}
anyOf 2artifactRelativePathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
    }
  ],
  "type": "string"
}
anyOf 2canonicalPathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
    }
  ],
  "type": "string"
}
anyOf 2citationAddressYes
{
  "type": "string"
}
anyOf 2citationTargetIdYes
{
  "type": "string"
}
anyOf 2datasetDigestYes
{
  "allOf": [
    {
      "pattern": "^[0-9a-f]{64}$"
    }
  ],
  "type": "string"
}
anyOf 2headingTextYes
{
  "type": "string"
}
anyOf 2headingTrailYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
anyOf 2nameYes
{
  "type": "string"
}
anyOf 2schemaVersionYes
{
  "type": "string"
}
anyOf 2slugYes
{
  "allOf": [
    {
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
    }
  ],
  "type": "string"
}
anyOf 2sourceArtifactKindYes
{
  "enum": [
    "structural-container"
  ],
  "type": "string"
}
anyOf 2sourceTextUrlYes
{
  "allOf": [
    {
      "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
    }
  ],
  "type": "string"
}
anyOf 2structuralPathYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
anyOf 2structuralPreorderIndexYes
{
  "type": "integer"
}
anyOf 2targetKindYes
{
  "enum": [
    "structural-container"
  ],
  "type": "string"
}
anyOf 2textDigestYes
{
  "allOf": [
    {
      "pattern": "^[0-9a-f]{64}$"
    }
  ],
  "type": "string"
}
anyOf 2textDigestAlgorithmYes
{
  "enum": [
    "sha256"
  ],
  "type": "string"
}
anyOf 2titleIdYes
{
  "type": "string"
}
anyOf 2versionDateYes
{
  "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",
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "artifactRelativePath": {
          "allOf": [
            {
              "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+\\.md$"
            }
          ],
          "type": "string"
        },
        "canonicalPath": {
          "allOf": [
            {
              "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
            }
          ],
          "type": "string"
        },
        "citationAddress": {
          "type": "string"
        },
        "citationTargetId": {
          "type": "string"
        },
        "datasetDigest": {
          "allOf": [
            {
              "pattern": "^[0-9a-f]{64}$"
            }
          ],
          "type": "string"
        },
        "documentOrder": {
          "type": "integer"
        },
        "headingText": {
          "type": "string"
        },
        "headingTrail": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "markdown": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "schemaVersion": {
          "type": "string"
        },
        "slug": {
          "allOf": [
            {
              "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
            }
          ],
          "type": "string"
        },
        "sourceArtifactBlockEndExclusive": {
          "type": "integer"
        },
        "sourceArtifactBlockStartIndex": {
          "type": "integer"
        },
        "sourceArtifactKind": {
          "enum": [
            "file",
            "directory-index",
            "document-frontmatter",
            "document-contents",
            "document-preamble"
          ],
          "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"
        },
        "targetKind": {
          "enum": [
            "markdown-artifact"
          ],
          "type": "string"
        },
        "textDigest": {
          "allOf": [
            {
              "pattern": "^[0-9a-f]{64}$"
            }
          ],
          "type": "string"
        },
        "textDigestAlgorithm": {
          "enum": [
            "sha256"
          ],
          "type": "string"
        },
        "titleId": {
          "type": "string"
        },
        "versionDate": {
          "allOf": [
            {
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          ],
          "type": "string"
        }
      },
      "required": [
        "artifactRelativePath",
        "canonicalPath",
        "citationAddress",
        "citationTargetId",
        "datasetDigest",
        "documentOrder",
        "headingText",
        "headingTrail",
        "markdown",
        "name",
        "schemaVersion",
        "slug",
        "sourceArtifactBlockEndExclusive",
        "sourceArtifactBlockStartIndex",
        "sourceArtifactKind",
        "sourceDocumentPath",
        "sourceIndexKind",
        "sourceTextUrl",
        "structuralPath",
        "targetKind",
        "textDigest",
        "textDigestAlgorithm",
        "titleId",
        "versionDate"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "artifactRelativePath": {
          "allOf": [
            {
              "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
            }
          ],
          "type": "string"
        },
        "canonicalPath": {
          "allOf": [
            {
              "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
            }
          ],
          "type": "string"
        },
        "citationAddress": {
          "type": "string"
        },
        "citationTargetId": {
          "type": "string"
        },
        "datasetDigest": {
          "allOf": [
            {
              "pattern": "^[0-9a-f]{64}$"
            }
          ],
          "type": "string"
        },
        "headingText": {
          "type": "string"
        },
        "headingTrail": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        },
        "schemaVersion": {
          "type": "string"
        },
        "slug": {
          "allOf": [
            {
              "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
            }
          ],
          "type": "string"
        },
        "sourceArtifactKind": {
          "enum": [
            "structural-container"
          ],
          "type": "string"
        },
        "sourceTextUrl": {
          "allOf": [
            {
              "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
            }
          ],
          "type": "string"
        },
        "structuralPath": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "structuralPreorderIndex": {
          "type": "integer"
        },
        "targetKind": {
          "enum": [
            "structural-container"
          ],
          "type": "string"
        },
        "textDigest": {
          "allOf": [
            {
              "pattern": "^[0-9a-f]{64}$"
            }
          ],
          "type": "string"
        },
        "textDigestAlgorithm": {
          "enum": [
            "sha256"
          ],
          "type": "string"
        },
        "titleId": {
          "type": "string"
        },
        "versionDate": {
          "allOf": [
            {
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          ],
          "type": "string"
        }
      },
      "required": [
        "artifactRelativePath",
        "canonicalPath",
        "citationAddress",
        "citationTargetId",
        "datasetDigest",
        "headingText",
        "headingTrail",
        "name",
        "schemaVersion",
        "slug",
        "sourceArtifactKind",
        "sourceTextUrl",
        "structuralPath",
        "structuralPreorderIndex",
        "targetKind",
        "textDigest",
        "textDigestAlgorithm",
        "titleId",
        "versionDate"
      ],
      "type": "object"
    }
  ],
  "x-legislation": {
    "artifactFamilyKey": "citation-targets",
    "artifactPathPattern": ".tooling/citation-targets/<slug>.jsonl",
    "derivationMode": "effect-derived",
    "schemaPath": ".tooling/schemas/citation-targets.schema.json",
    "schemaVersion": "1.0.0",
    "shapeKind": "encoded-jsonl-record",
    "sourceEffectExport": "CitationTargetRecordJson",
    "sourceEffectModule": "src/domain/citationTarget.ts"
  }
}

a6de85cccf489b7b121dcec0cddf38c459fff4af3f64d1bc4fde69b4753ec0c5