{
  "$defs": {
    "ParsedMethodologyItem": {
      "additionalProperties": false,
      "properties": {
        "uuid": {
          "default": "",
          "description": "Identifies the item to update within the methodology this document names. An item carrying none is added, and one matching no item of that methodology is skipped. Ignored when the document names no methodology, which mints fresh identifiers.",
          "title": "Uuid",
          "type": "string"
        },
        "order": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Orders the item within a new methodology, defaulting to its position within this document. Ignored by an update, which keeps the position of an item it matches and appends one it adds.",
          "title": "Order"
        },
        "name": {
          "maxLength": 400,
          "title": "Name",
          "type": "string"
        },
        "reference": {
          "default": "",
          "title": "Reference",
          "type": "string"
        },
        "category": {
          "default": "",
          "title": "Category",
          "type": "string"
        },
        "description": {
          "default": "",
          "title": "Description",
          "type": "string"
        },
        "subcategory": {
          "default": "",
          "title": "Subcategory",
          "type": "string"
        },
        "level": {
          "default": "",
          "title": "Level",
          "type": "string"
        },
        "guide": {
          "default": "",
          "title": "Guide",
          "type": "string"
        },
        "status": {
          "default": "",
          "description": "Must be one of the target methodology's status choices. Defaults to the first of them when blank.",
          "title": "Status",
          "type": "string"
        },
        "notes": {
          "default": "",
          "title": "Notes",
          "type": "string"
        },
        "riskrating": {
          "default": "",
          "title": "Riskrating",
          "type": "string"
        },
        "references": {
          "default": "",
          "title": "References",
          "type": "string"
        },
        "assets": {
          "description": "Resolved by `asset` name within the target phase on import; `uuid` is ignored. An import adds links, it never removes them.",
          "items": {
            "$ref": "#/$defs/ParsedMethodologyItemAsset"
          },
          "title": "Assets",
          "type": "array"
        },
        "findings": {
          "description": "Exported for reference only. Finding links come from the KB auto-fail flow and are ignored on import.",
          "items": {
            "$ref": "#/$defs/ParsedMethodologyItemFinding"
          },
          "title": "Findings",
          "type": "array"
        },
        "custom_fields": {
          "description": "Every name must match an enabled methodology item custom field.",
          "items": {
            "$ref": "#/$defs/ParsedMethodologyItemCustomField"
          },
          "title": "Custom Fields",
          "type": "array"
        }
      },
      "required": [
        "name"
      ],
      "title": "ParsedMethodologyItem",
      "type": "object"
    },
    "ParsedMethodologyItemAsset": {
      "additionalProperties": false,
      "properties": {
        "uuid": {
          "default": "",
          "title": "Uuid",
          "type": "string"
        },
        "asset": {
          "title": "Asset",
          "type": "string"
        }
      },
      "required": [
        "asset"
      ],
      "title": "ParsedMethodologyItemAsset",
      "type": "object"
    },
    "ParsedMethodologyItemCustomField": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "value": {
          "title": "Value",
          "type": "string"
        }
      },
      "required": [
        "name",
        "value"
      ],
      "title": "ParsedMethodologyItemCustomField",
      "type": "object"
    },
    "ParsedMethodologyItemFinding": {
      "additionalProperties": false,
      "properties": {
        "uuid": {
          "default": "",
          "title": "Uuid",
          "type": "string"
        },
        "title": {
          "default": "",
          "title": "Title",
          "type": "string"
        }
      },
      "title": "ParsedMethodologyItemFinding",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "uuid": {
      "default": "",
      "description": "Identifies the methodology to update, which must be one of the target phase's. A document carrying none records a new methodology.",
      "title": "Uuid",
      "type": "string"
    },
    "name": {
      "maxLength": 400,
      "title": "Name",
      "type": "string"
    },
    "description": {
      "default": "",
      "title": "Description",
      "type": "string"
    },
    "enabled_fields": {
      "items": {
        "type": "string"
      },
      "title": "Enabled Fields",
      "type": "array"
    },
    "status_choices": {
      "items": {
        "type": "string"
      },
      "title": "Status Choices",
      "type": "array"
    },
    "categories": {
      "description": "Recomputed from the item categories on import.",
      "items": {
        "type": "string"
      },
      "title": "Categories",
      "type": "array"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/ParsedMethodologyItem"
      },
      "maxItems": 5000,
      "title": "Items",
      "type": "array"
    }
  },
  "required": [
    "name",
    "items"
  ],
  "title": "ParsedMethodology",
  "type": "object"
}
