Makoto
Menu
Schema reference

catalog.schema.json

The shape of that catalog, so a resolver can validate an index before trusting any entry in it.

Title
Makoto v0.2 Schema Catalog
Identifier
https://usemakoto.dev/schema/v0.2/catalog.schema.json
Digest
sha256:30b478401528256f823a27418d1316ca27b1ccb8ecaf45d1afa2edbbcb1fd797
Raw
/schema/v0.2/catalog.schema.json
Carried in
Validates every catalog document: the hosted core catalog, a bundle's schemaCatalog, and the receiver catalog passed to makoto verify bundle --schema-catalog.
Responsibility
Offline (id, digest) -> path resource mappings.

All schemas§12.3FieldsRaw JSON

A real instance. Read from demos/end-to-end/artifacts/receiver/catalog.json, which validates against this schema.
{
  "resources": [
    {
      "digest": {
        "sha256": "68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb"
      },
      "id": "https://schemas.example.internal/makoto/customer-public-v1.schema.json",
      "path": "resources/68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb.schema.json"
    },
    {
      "digest": {
        "sha256": "31934d2cf8fa7b5af2f8e4cf591d96278c4f59ddb6bb190afccb93701244f9eb"
      },
      "id": "https://schemas.example.internal/makoto/public-transform-metadata-v1.schema.json",
      "path": "resources/31934d2cf8fa7b5af2f8e4cf591d96278c4f59ddb6bb190afccb93701244f9eb.schema.json"
    }
  ],
  "version": "0.2"
}

Fields

Top leveldigestpathresource

Top level#

Shape object
  • closed object
FieldTypeConstraints, rules, and a real value
version
required
string constant
  • = "0.2"
"0.2"
resources
required
array of resource
[{"digest": {"sha256": "68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb"}, "id…

digest#

Shape object
  • closed object

Appears at resources[].digest

FieldTypeConstraints, rules, and a real value
sha256
required
string
  • min length 64
  • max length 64
"68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb"

path#

Shape string
  • min length 1
  • max length 1024

Appears at resources[].path

resource#

Shape object
  • closed object

Appears at resources[]

FieldTypeConstraints, rules, and a real value
id
required
string
  • min length 1
  • max length 4096
"https://schemas.example.internal/makoto/customer-public-v1.schema.json"
digest
required
digest
{"sha256": "68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb"}
path
required
path
"resources/68169d043c628fda5435cbd7845b02ea3e0d850b7a509c0b35fd304463fffacb.schema.json"

Real documents that validate

  • demos/end-to-end/artifacts/receiver/catalog.json
  • demos/end-to-end/artifacts/positive-bundle/schemas/catalog.json

Raw JSON

The published document (1,049 bytes)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://usemakoto.dev/schema/v0.2/catalog.schema.json",
  "title": "Makoto v0.2 Schema Catalog",
  "type": "object",
  "required": ["version", "resources"],
  "properties": {
    "version": { "const": "0.2" },
    "resources": {
      "type": "array",
      "items": { "$ref": "#/$defs/resource" }
    }
  },
  "$defs": {
    "digest": {
      "type": "object",
      "required": ["sha256"],
      "properties": { "sha256": { "type": "string", "minLength": 64, "maxLength": 64 } },
      "additionalProperties": false
    },
    "path": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "resource": {
      "type": "object",
      "required": ["id", "digest", "path"],
      "properties": {
        "id": { "type": "string", "minLength": 1, "maxLength": 4096 },
        "digest": { "$ref": "#/$defs/digest" },
        "path": { "$ref": "#/$defs/path" }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

The published bytes, unmodified.