{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amplerun-com/json-schema/amplerun-com-setting-view-schema.json",
  "title": "SettingView",
  "description": "One row of the D-20 settings registry, or a pinned root-of-trust key. When `secret` is true, `value` is always `{set: boolean}` — the wire never carries a secret or a root-of-trust value.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amplerun-com-admin-api-openapi.yml#/components/schemas/SettingView",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "key",
    "category",
    "label",
    "help",
    "secret",
    "editable",
    "pinned_reason",
    "value",
    "source",
    "version",
    "updated_at",
    "updated_by",
    "env"
  ],
  "properties": {
    "key": {
      "type": "string"
    },
    "category": {
      "type": "string",
      "enum": [
        "branding",
        "contact",
        "money",
        "mail",
        "alerts",
        "auth-providers",
        "chain-access",
        "operations"
      ]
    },
    "label": {
      "type": "string"
    },
    "help": {
      "type": "string"
    },
    "secret": {
      "type": "boolean"
    },
    "editable": {
      "type": "boolean",
      "description": "False for a root-of-trust key — refused at the API, read-only in the UI."
    },
    "pinned_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "value": {},
    "source": {
      "type": "string",
      "enum": [
        "database",
        "environment",
        "default"
      ]
    },
    "version": {
      "type": "integer"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "env": {
      "type": "string"
    }
  }
}