{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:semantic-management-framework:0.1:schema:perspective",
  "$comment": "SPDX-License-Identifier: Apache-2.0",
  "title": "SMF Perspective",
  "type": "object",
  "description": "A legitimate, owned meaning of a concept (e.g., the service perspective on Gross Margin). Two things can be true.",
  "properties": {
    "smf": {
      "const": "0.1"
    },
    "kind": {
      "const": "Perspective"
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+$"
    },
    "concept_ref": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+(@v[0-9]+)?$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string"
    },
    "owner": {
      "type": "string",
      "minLength": 1
    },
    "applies_when": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "string",
          "number",
          "boolean"
        ]
      },
      "description": "Context conditions that normally select this perspective."
    },
    "enterprise_default": {
      "type": "boolean",
      "description": "The perspective an answer rule names for specific enterprise contexts (e.g., board reporting). Not a fallback for other questions."
    },
    "broader_than": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+(@v[0-9]+)?$"
      },
      "description": "Perspectives this one contains (it is the broader of the pair)."
    },
    "status": {
      "type": "string",
      "enum": [
        "incomplete",
        "candidate",
        "recorded",
        "qualified",
        "standard",
        "preferred_standard",
        "superseded",
        "retired",
        "historical",
        "application"
      ]
    }
  },
  "required": [
    "smf",
    "kind",
    "id",
    "concept_ref",
    "name",
    "owner"
  ],
  "additionalProperties": false
}
