Skip to content
Legislation
Esc
navigateopen⌘Jpreview

Legislation · public publication pilot

cross-references: 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"
  },
  {
    "identifierName": "targetCanonicalPath",
    "mechanicalInputs": "slug, version date, artifact path, and structural path",
    "stabilityRule": "stable-while-structural-inputs-stable",
    "uniquenessScope": "slug-version"
  }
]

Fields (30)

VariantFieldRequiredPublished constraints
CommonconfidenceYes
{
  "enum": [
    "exact",
    "contextual"
  ],
  "type": "string"
}
CommonnameYes
{
  "type": "string"
}
CommonreferenceTextYes
{
  "type": "string"
}
CommonschemaVersionYes
{
  "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"
}
CommonsourceHeadingTextYes
{
  "type": "string"
}
CommonsourceHeadingTrailYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommonsourceLineNumberYes
{
  "type": "integer"
}
CommonsourceLineTextYes
{
  "type": "string"
}
CommonsourceMatchTextYes
{
  "type": "string"
}
CommonsourceStructuralPathYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommonsourceTextUrlYes
{
  "allOf": [
    {
      "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
    }
  ],
  "type": "string"
}
CommontargetArtifactKindYes
{
  "enum": [
    "file",
    "directory-index",
    "document-frontmatter",
    "document-contents",
    "document-preamble",
    "structural-container"
  ],
  "type": "string"
}
CommontargetArtifactRelativePathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
    }
  ],
  "type": "string"
}
CommontargetCanonicalPathYes
{
  "allOf": [
    {
      "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
    }
  ],
  "type": "string"
}
CommontargetHeadingTextYes
{
  "type": "string"
}
CommontargetHeadingTrailYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommontargetKindYes
{
  "enum": [
    "chapter",
    "part",
    "division",
    "subdivision",
    "schedule",
    "section",
    "subsection",
    "paragraph",
    "subparagraph",
    "clause",
    "subclause"
  ],
  "type": "string"
}
CommontargetLocatorTextYes
{
  "type": "string"
}
CommontargetResolutionKindYes
{
  "enum": [
    "artifact",
    "intra-artifact"
  ],
  "type": "string"
}
CommontargetRootIdentifierYes
{
  "type": "string"
}
CommontargetRootKindYes
{
  "enum": [
    "chapter",
    "part",
    "division",
    "subdivision",
    "schedule",
    "section",
    "clause"
  ],
  "type": "string"
}
CommontargetScopeYes
{
  "enum": [
    "intra-document"
  ],
  "type": "string"
}
CommontargetStructuralPathYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
CommontargetSubordinatePathYes
{
  "items": {
    "type": "string"
  },
  "type": "array"
}
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": {
    "confidence": {
      "enum": [
        "exact",
        "contextual"
      ],
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "referenceText": {
      "type": "string"
    },
    "schemaVersion": {
      "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"
    },
    "sourceHeadingText": {
      "type": "string"
    },
    "sourceHeadingTrail": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "sourceLineNumber": {
      "type": "integer"
    },
    "sourceLineText": {
      "type": "string"
    },
    "sourceMatchText": {
      "type": "string"
    },
    "sourceStructuralPath": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "sourceTextUrl": {
      "allOf": [
        {
          "pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
        }
      ],
      "type": "string"
    },
    "targetArtifactKind": {
      "enum": [
        "file",
        "directory-index",
        "document-frontmatter",
        "document-contents",
        "document-preamble",
        "structural-container"
      ],
      "type": "string"
    },
    "targetArtifactRelativePath": {
      "allOf": [
        {
          "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
        }
      ],
      "type": "string"
    },
    "targetCanonicalPath": {
      "allOf": [
        {
          "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
        }
      ],
      "type": "string"
    },
    "targetHeadingText": {
      "type": "string"
    },
    "targetHeadingTrail": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "targetKind": {
      "enum": [
        "chapter",
        "part",
        "division",
        "subdivision",
        "schedule",
        "section",
        "subsection",
        "paragraph",
        "subparagraph",
        "clause",
        "subclause"
      ],
      "type": "string"
    },
    "targetLocatorText": {
      "type": "string"
    },
    "targetResolutionKind": {
      "enum": [
        "artifact",
        "intra-artifact"
      ],
      "type": "string"
    },
    "targetRootIdentifier": {
      "type": "string"
    },
    "targetRootKind": {
      "enum": [
        "chapter",
        "part",
        "division",
        "subdivision",
        "schedule",
        "section",
        "clause"
      ],
      "type": "string"
    },
    "targetScope": {
      "enum": [
        "intra-document"
      ],
      "type": "string"
    },
    "targetStructuralPath": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "targetSubordinatePath": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "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",
    "sourceLineNumber",
    "sourceLineText",
    "sourceMatchText",
    "referenceText",
    "confidence",
    "targetScope",
    "targetKind",
    "targetResolutionKind",
    "targetRootKind",
    "targetRootIdentifier",
    "targetSubordinatePath",
    "targetLocatorText",
    "targetCanonicalPath",
    "targetArtifactRelativePath",
    "targetArtifactKind",
    "targetStructuralPath",
    "targetHeadingTrail",
    "targetHeadingText"
  ],
  "type": "object",
  "x-legislation": {
    "artifactFamilyKey": "cross-references",
    "artifactPathPattern": ".tooling/cross-references/<slug>.jsonl",
    "derivationMode": "effect-derived",
    "schemaPath": ".tooling/schemas/cross-references.schema.json",
    "schemaVersion": "1.0.0",
    "shapeKind": "encoded-jsonl-record",
    "sourceEffectExport": "CrossReferenceRecordJson",
    "sourceEffectModule": "src/domain/crossReference.ts"
  }
}

a6de85cccf489b7b121dcec0cddf38c459fff4af3f64d1bc4fde69b4753ec0c5