{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/torii/refs/heads/main/json-schema/field-metadata.json",
  "title": "Torii Field Metadata",
  "description": "Metadata describing a predefined or custom field for apps, users, or contracts in Torii.",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "Field key identifier."
    },
    "name": {
      "type": "string",
      "description": "Display name of the field."
    },
    "type": {
      "type": "string",
      "description": "Data type of the field."
    },
    "isCustom": {
      "type": "boolean",
      "description": "Whether this is a custom field."
    },
    "isRequired": {
      "type": "boolean",
      "description": "Whether this field is required."
    }
  },
  "required": ["key", "name", "type"]
}
