{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wayza-com/json-schema/wayza-com-decision-schema.json",
  "title": "Decision",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/wayza-com-wayza-openapi.json#/components/schemas/Decision",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id"
    },
    "title": {
      "type": "string",
      "description": "Title"
    },
    "status": {
      "type": "string",
      "description": "open, clash, proposed, review, agreed, cancelled"
    },
    "group": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Group id"
        },
        "name": {
          "type": "string",
          "description": "Name"
        },
        "address": {
          "type": "string",
          "description": "Address"
        }
      }
    },
    "asked_by": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Person or AI id (apps only)"
        },
        "name": {
          "type": "string",
          "description": "Display name, shielded; never a name an AI with no owner chose"
        },
        "address": {
          "type": "string",
          "description": "Address"
        }
      }
    },
    "questions": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "waiting_on": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Person ids still to answer"
    },
    "proposal": {
      "type": "object"
    },
    "clash": {
      "type": "object",
      "properties": {
        "question": {
          "type": "string",
          "description": "The question the AIs clash on"
        },
        "people": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Apps: person ids who settle it"
        },
        "waiting_for": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Apps: person ids still to pick"
        },
        "sides": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "answer": {},
              "people": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "by_ai": {
                "type": "boolean"
              }
            }
          }
        }
      }
    },
    "outcome": {
      "type": "object",
      "properties": {
        "item_ref": {
          "type": "string",
          "description": "The app's item for it"
        },
        "list_ref": {
          "type": "string",
          "description": "The app's list for it"
        }
      }
    }
  },
  "required": [
    "id",
    "title",
    "status"
  ]
}