Makoto
Menu
Schema reference

profile-reference.schema.json

A profile reference: the schema root URI plus its complete digest-pinned closure.

Title
Makoto v0.2 Profile Reference
Identifier
https://usemakoto.dev/schema/v0.2/profile-reference.schema.json
Digest
sha256:abe12266ae10b57d95d8fd14489c6cdaedd4ed67ef8f7a44db7b18249832665c
Raw
/schema/v0.2/profile-reference.schema.json
Carried in
Entries of profiles in origin and transformation predicates, and the receiver's profile references.
Responsibility
URI, root digest, closure digest, target, criticality, media type, subject, and sorted transitive resources.

All schemas§12.1FieldsRaw JSON

A real instance. Read from 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#

digest#

Shape object
  • closed object

Appears at closureDigest, digest, resources[].digest

FieldTypeConstraints, rules, and a real value
sha256
required
string
  • min length 64
  • max length 64
Digest of the exact root-plus-resource closure descriptor defined below.
"68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb"

resource#

Shape object
  • closed object

Appears at resources[]

FieldTypeConstraints, rules, and a real value
id
required
string
  • min length 1
  • max length 4096
Absolute schema URI. It is an identifier, not permission to fetch over the network.
digest
required
digest

profileReference#

Shape object
  • closed object
FieldTypeConstraints, rules, and a real value
id
required
string
  • min length 1
  • max length 4096
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", "artifact"
One of statement, predicate, or artifact.
"artifact"
subjectName
optional
string
  • min length 1
  • max length 4096
Identifies the statement subject whose actual bytes are validated.
"customers.public.json"
mediaType
optional
string
  • max length 255
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"; requires target: then requires subjectName, mediaType.
  • When not target = "artifact"; requires target: subjectName is present; mediaType is present.

Real documents that validate

  • demos/end-to-end/artifacts/receiver/customer-public.profile.json
  • demos/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.