MSP-1 schema

parent

Identifies the higher-level resource, page, section, collection, or structural context that contains or organizes the current MSP-1 resource.

MSP-1 v1.0.2 • Core term

parent schema definition

Machine-readable structure for expressing parent links, hierarchy, and structural context.

parent schema JSON


{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://msp-1.org/schema/parent/parent.json",
  "title": "MSP-1 Parent Schema",
  "description": "Schema for representing the higher-level resource, page, section, collection, or structural context that contains or organizes the current MSP-1 resource.",
  "$comment": "MSP-1 v1.0.2 treats parent as an object with id as the required parent reference field. Legacy flat-string parent values may be interpreted as a parent id or URL during graceful degradation, but the canonical form is an object.",
  "type": "object",

  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "description": "Stable identifier for the parent resource."
    },

    "url": {
      "type": "string",
      "format": "uri",
      "description": "Optional URL of the parent resource when it is web-addressable."
    },

    "type": {
      "type": "string",
      "enum": ["site", "section", "page", "collection", "other"],
      "description": "Classification of the parent entity."
    },

    "label": {
      "type": "string",
      "description": "Human-readable label for the parent resource."
    },

    "relation": {
      "type": "string",
      "enum": ["direct", "logical", "organizational"],
      "description": "Indicates whether the parent is a direct structural parent, logical grouping, or organizational grouping."
    },

    "path": {
      "type": "array",
      "description": "Optional ordered list of ancestor identifiers from top-level down to this parent.",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },

    "depth": {
      "type": "integer",
      "minimum": 0,
      "description": "Optional depth of the current resource in the hierarchy relative to the top-level root."
    },

    "lastUpdated": {
      "type": "string",
      "format": "date",
      "description": "Date when this parent relationship was last reviewed or updated."
    }
  },

  "required": ["id"],

  "additionalProperties": false,

  "examples": [
    {
      "id": "lighting-guide"
    },
    {
      "id": "guides",
      "type": "collection",
      "relation": "organizational"
    },
    {
      "id": "documentation",
      "url": "https://msp-1.org/spec/",
      "type": "page",
      "relation": "direct",
      "path": [
        "site-root",
        "documentation"
      ],
      "depth": 2
    }
  ]
}


 

Schema notes

The canonical MSP-1 v1.0.2 form for parent is an object with id as the required parent reference field.

parent should not be confused with section or canonical. parent defines hierarchical containment or grouping; section identifies a content subdivision or category; canonical identifies the preferred URL representation.