{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/opendecree-configuration/versions/v0.1.0.json",
  "title": "OpenDecree Config Format (v0.1.0)",
  "description": "Tenant-side import format for OpenDecree config values. A decree.config.yaml file declares the values to apply against a previously imported schema; the server enforces type compatibility and cross-field rules at write time.",
  "x-lintel": {
    "source": "https://schemas.opendecree.dev/schema/v0.1.0/decree-config.json",
    "sourceSha256": "502be9dc4012311a71a7d22787cdd1a7a7727d1ad33878e4b7b75155e88aef5f",
    "fileMatch": [
      "decree.config.yaml",
      "decree.config.yml",
      "*.decree.config.yaml",
      "*.decree.config.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "spec_version": {
      "description": "Decree config-format spec version. Must be \"v1\".",
      "type": "string",
      "const": "v1"
    },
    "$schema": {
      "description": "Optional pointer to this meta-schema. HTTPS URL.",
      "type": "string",
      "format": "uri",
      "pattern": "^https://"
    },
    "description": {
      "description": "Human-readable description of the config (e.g. release notes).",
      "type": "string"
    },
    "version": {
      "description": "Informational config version. The server assigns the next version on import; this field is round-tripped through ImportConfig / ExportConfig for documentation purposes.",
      "type": "integer",
      "minimum": 1
    },
    "values": {
      "description": "Map of field path to value entry. Field paths must reference real fields in the bound schema; the server enforces this at import. The value's wire shape depends on the schema's field type (integer/number/string/bool/time/duration/url/json) — meta-schema does not type-check the value itself.",
      "type": "object",
      "minProperties": 1,
      "propertyNames": {
        "$ref": "#/$defs/fieldPath"
      },
      "additionalProperties": {
        "$ref": "#/$defs/configValue"
      }
    }
  },
  "required": [
    "spec_version",
    "values"
  ],
  "patternProperties": {
    "^x-": true
  },
  "$defs": {
    "fieldPath": {
      "description": "Field path. ASCII letter/underscore start; alphanumeric, underscore, dot, hyphen.",
      "type": "string",
      "pattern": "^[a-zA-Z_][a-zA-Z0-9_.-]*$"
    },
    "configValue": {
      "description": "One value entry. The actual value's type is checked server-side against the schema.",
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "description": "The value to apply. Type must match the bound schema's field type — checked server-side. Null indicates the field is being cleared."
        },
        "description": {
          "description": "Human-readable description of this specific value.",
          "type": "string"
        }
      },
      "unevaluatedProperties": false,
      "patternProperties": {
        "^x-": true
      }
    }
  },
  "unevaluatedProperties": false
}
