{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://thesoftwarelens.com/saacip/0.2/schemas/report.schema.json",
  "$comment": "SaaCIP 0.2 (https://thesoftwarelens.com/saacip/). Licensed under the Apache License 2.0.",
  "title": "SaaCIP 0.2 HTTP binding: report request",
  "description": "PUT <base>/work-items/<ref>/ (HTTP binding, Resident profile section 6, shared with the Hosted profile). The first call for a ref creates the work item; later calls with the same ref add a note. Repeating a call has no further effect.",
  "type": "object",
  "anyOf": [
    {
      "required": [
        "subject",
        "description_html"
      ]
    },
    {
      "required": [
        "note"
      ]
    },
    {
      "required": [
        "handoff"
      ]
    }
  ],
  "properties": {
    "subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "description_html": {
      "type": "string",
      "maxLength": 20000
    },
    "priority_level": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4,
      "description": "How urgent the capability thinks the item is: 1 is the most urgent."
    },
    "note": {
      "type": "string",
      "maxLength": 5000,
      "description": "An update to an open item: what changed since the last report."
    },
    "ext": {
      "$ref": "common.schema.json#/$defs/ext"
    },
    "handoff": {
      "$ref": "common.schema.json#/$defs/handoff",
      "description": "Hand this item to a role in the capability's terms (section 6.5). Added in 0.2."
    },
    "origin": {
      "$ref": "common.schema.json#/$defs/origin",
      "description": "This new item was taken up from a hand-off (section 6.5). Added in 0.2."
    }
  }
}
