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)
| Variant | Field | Required | Published constraints |
|---|---|---|---|
| anyOf 1 | artifactRelativePath | Yes | {
"allOf": [
{
"pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+\\.md$"
}
],
"type": "string"
} |
| anyOf 1 | canonicalPath | Yes | {
"allOf": [
{
"pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
}
],
"type": "string"
} |
| anyOf 1 | citationAddress | Yes | {
"type": "string"
} |
| anyOf 1 | citationTargetId | Yes | {
"type": "string"
} |
| anyOf 1 | datasetDigest | Yes | {
"allOf": [
{
"pattern": "^[0-9a-f]{64}$"
}
],
"type": "string"
} |
| anyOf 1 | documentOrder | Yes | {
"type": "integer"
} |
| anyOf 1 | headingText | Yes | {
"type": "string"
} |
| anyOf 1 | headingTrail | Yes | {
"items": {
"type": "string"
},
"type": "array"
} |
| anyOf 1 | markdown | Yes | {
"type": "string"
} |
| anyOf 1 | name | Yes | {
"type": "string"
} |
| anyOf 1 | schemaVersion | Yes | {
"type": "string"
} |
| anyOf 1 | slug | Yes | {
"allOf": [
{
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
}
],
"type": "string"
} |
| anyOf 1 | sourceArtifactBlockEndExclusive | Yes | {
"type": "integer"
} |
| anyOf 1 | sourceArtifactBlockStartIndex | Yes | {
"type": "integer"
} |
| anyOf 1 | sourceArtifactKind | Yes | {
"enum": [
"file",
"directory-index",
"document-frontmatter",
"document-contents",
"document-preamble"
],
"type": "string"
} |
| anyOf 1 | sourceDocumentPath | Yes | {
"type": "string"
} |
| anyOf 1 | sourceIndexKind | Yes | {
"enum": [
"body-block",
"body-div"
],
"type": "string"
} |
| anyOf 1 | sourceTextUrl | Yes | {
"allOf": [
{
"pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
}
],
"type": "string"
} |
| anyOf 1 | structuralPath | Yes | {
"items": {
"type": "string"
},
"type": "array"
} |
| anyOf 1 | targetKind | Yes | {
"enum": [
"markdown-artifact"
],
"type": "string"
} |
| anyOf 1 | textDigest | Yes | {
"allOf": [
{
"pattern": "^[0-9a-f]{64}$"
}
],
"type": "string"
} |
| anyOf 1 | textDigestAlgorithm | Yes | {
"enum": [
"sha256"
],
"type": "string"
} |
| anyOf 1 | titleId | Yes | {
"type": "string"
} |
| anyOf 1 | versionDate | Yes | {
"allOf": [
{
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
}
],
"type": "string"
} |
| anyOf 2 | artifactRelativePath | Yes | {
"allOf": [
{
"pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
}
],
"type": "string"
} |
| anyOf 2 | canonicalPath | Yes | {
"allOf": [
{
"pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))(?!.*\\/\\/)[^\\0\\r\\n]+$"
}
],
"type": "string"
} |
| anyOf 2 | citationAddress | Yes | {
"type": "string"
} |
| anyOf 2 | citationTargetId | Yes | {
"type": "string"
} |
| anyOf 2 | datasetDigest | Yes | {
"allOf": [
{
"pattern": "^[0-9a-f]{64}$"
}
],
"type": "string"
} |
| anyOf 2 | headingText | Yes | {
"type": "string"
} |
| anyOf 2 | headingTrail | Yes | {
"items": {
"type": "string"
},
"type": "array"
} |
| anyOf 2 | name | Yes | {
"type": "string"
} |
| anyOf 2 | schemaVersion | Yes | {
"type": "string"
} |
| anyOf 2 | slug | Yes | {
"allOf": [
{
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
}
],
"type": "string"
} |
| anyOf 2 | sourceArtifactKind | Yes | {
"enum": [
"structural-container"
],
"type": "string"
} |
| anyOf 2 | sourceTextUrl | Yes | {
"allOf": [
{
"pattern": "^https:\\/\\/www\\.legislation\\.gov\\.au\\/.+$"
}
],
"type": "string"
} |
| anyOf 2 | structuralPath | Yes | {
"items": {
"type": "string"
},
"type": "array"
} |
| anyOf 2 | structuralPreorderIndex | Yes | {
"type": "integer"
} |
| anyOf 2 | targetKind | Yes | {
"enum": [
"structural-container"
],
"type": "string"
} |
| anyOf 2 | textDigest | Yes | {
"allOf": [
{
"pattern": "^[0-9a-f]{64}$"
}
],
"type": "string"
} |
| anyOf 2 | textDigestAlgorithm | Yes | {
"enum": [
"sha256"
],
"type": "string"
} |
| anyOf 2 | titleId | Yes | {
"type": "string"
} |
| anyOf 2 | versionDate | Yes | {
"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