profile-reference.schema.json
A profile reference: the schema root URI plus its complete digest-pinned closure.
All schemas§12.1FieldsRaw JSON
demos/end-to-end/artifacts/receiver/customer-public.profile.json, which validates against this schema.{
"closureDigest": {
"sha256": "57eec614be9b2141ad536f486ff4400b514d79b8b1cc9642a839cf1a39b10794"
},
"critical": true,
"digest": {
"sha256": "68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb"
},
"id": "https://schemas.example.internal/makoto/customer-public-v1.schema.json",
"mediaType": "application/json",
"resources": [],
"subjectName": "customers.public.json",
"target": "artifact"
}Referenced by
Fields
Top leveldigestresourceprofileReference
Top level#
Shape profileReference
digest#
Shape object
- closed object
Appears at closureDigest, digest, resources[].digest
| Field | Type | Constraints, rules, and a real value |
|---|---|---|
| sha256 required | string |
Digest of the exact root-plus-resource closure descriptor defined below. "68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb" |
resource#
Shape object
- closed object
Appears at resources[]
| Field | Type | Constraints, rules, and a real value |
|---|---|---|
| id required | string |
Absolute schema URI. It is an identifier, not permission to fetch over the network. |
| digest required | digest |
profileReference#
Shape object
- closed object
| Field | Type | Constraints, rules, and a real value |
|---|---|---|
| id required | string |
Absolute schema URI. It is an identifier, not permission to fetch over the network. "https://schemas.example.internal/makoto/customer-public-v1.schema.json" |
| digest required | digest | {"sha256": "68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb"} |
| closureDigest required | digest | {"sha256": "57eec614be9b2141ad536f486ff4400b514d79b8b1cc9642a839cf1a39b10794"} |
| target required | enum |
One of statement, predicate, or artifact."artifact" |
| subjectName optional | string |
Identifies the statement subject whose actual bytes are validated. "customers.public.json" |
| mediaType optional | string |
Signed declaration selecting the supported artifact parser, such as application/json or application/x-ndjson."application/json" |
| critical required | boolean | If true, unresolved or unsupported validation MUST fail. true |
| resources required | array of resource | Sorted digest-pinned transitive schema resources; an empty array means the root has no non-core external resources. [] |
Conditional rules
- When
target= "artifact"; requirestarget: then requiressubjectName,mediaType. - When not
target= "artifact"; requirestarget:subjectNameis present;mediaTypeis present.
Real documents that validate
demos/end-to-end/artifacts/receiver/customer-public.profile.jsondemos/end-to-end/artifacts/receiver/public-transform-metadata.profile.json
Raw JSON
The published document (1,854 bytes)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://usemakoto.dev/schema/v0.2/profile-reference.schema.json",
"title": "Makoto v0.2 Profile Reference",
"$ref": "#/$defs/profileReference",
"$defs": {
"digest": {
"type": "object",
"required": ["sha256"],
"properties": {
"sha256": { "type": "string", "minLength": 64, "maxLength": 64 }
},
"additionalProperties": false
},
"resource": {
"type": "object",
"required": ["id", "digest"],
"properties": {
"id": { "type": "string", "minLength": 1, "maxLength": 4096 },
"digest": { "$ref": "#/$defs/digest" }
},
"additionalProperties": false
},
"profileReference": {
"type": "object",
"required": ["id", "digest", "closureDigest", "target", "critical", "resources"],
"properties": {
"id": { "type": "string", "minLength": 1, "maxLength": 4096 },
"digest": { "$ref": "#/$defs/digest" },
"closureDigest": { "$ref": "#/$defs/digest" },
"target": { "enum": ["statement", "predicate", "artifact"] },
"subjectName": { "type": "string", "minLength": 1, "maxLength": 4096 },
"mediaType": {
"type": "string",
"maxLength": 255
},
"critical": { "type": "boolean" },
"resources": {
"type": "array",
"items": { "$ref": "#/$defs/resource" }
}
},
"allOf": [
{
"if": { "properties": { "target": { "const": "artifact" } }, "required": ["target"] },
"then": { "required": ["subjectName", "mediaType"] },
"else": {
"properties": {
"subjectName": false,
"mediaType": false
}
}
}
],
"additionalProperties": false
}
}
}
The published bytes, unmodified.