{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "report": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "scanId": {
              "type": "string"
            },
            "completedAt": {
              "type": "string"
            },
            "layout": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "pages": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "checked": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "unknown": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "total",
                "checked",
                "unknown"
              ],
              "additionalProperties": false
            },
            "linksTotal": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "truncated": {
              "type": "boolean"
            },
            "findings": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "openFindings": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Resource identifier returned by the operation."
                  },
                  "kind": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "high",
                      "medium",
                      "low"
                    ]
                  },
                  "pageUrl": {
                    "type": "string"
                  },
                  "targetUrl": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "priority",
                  "pageUrl",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "opportunitiesTotal": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "changes": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "no_baseline",
                        "unavailable"
                      ],
                      "description": "Saved lifecycle or evidence state, as enumerated for this record."
                    },
                    "baselineScanId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "description": "Recorded explanation; null when no explanation applies.",
                      "type": "string"
                    },
                    "counts": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "kind",
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "state",
                    "baselineScanId"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "search": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "description": "Saved lifecycle or evidence state, as enumerated for this record."
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Recorded explanation; null when no explanation applies."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Recorded explanation; null when no explanation applies."
                    },
                    "pages": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "queries": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "seeded": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "state",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "scanId",
            "completedAt",
            "layout",
            "pages",
            "linksTotal",
            "truncated",
            "findings",
            "openFindings",
            "opportunitiesTotal",
            "changes",
            "search"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "baseline": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "scanId": {
              "type": "string"
            },
            "completedAt": {
              "type": "string"
            },
            "layout": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "pages": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "checked": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "unknown": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "total",
                "checked",
                "unknown"
              ],
              "additionalProperties": false
            },
            "linksTotal": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "truncated": {
              "type": "boolean"
            },
            "findings": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "openFindings": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Resource identifier returned by the operation."
                  },
                  "kind": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "high",
                      "medium",
                      "low"
                    ]
                  },
                  "pageUrl": {
                    "type": "string"
                  },
                  "targetUrl": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "priority",
                  "pageUrl",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "opportunitiesTotal": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "changes": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "no_baseline",
                        "unavailable"
                      ],
                      "description": "Saved lifecycle or evidence state, as enumerated for this record."
                    },
                    "baselineScanId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "description": "Recorded explanation; null when no explanation applies.",
                      "type": "string"
                    },
                    "counts": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "kind",
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "state",
                    "baselineScanId"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "search": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "description": "Saved lifecycle or evidence state, as enumerated for this record."
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Recorded explanation; null when no explanation applies."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Recorded explanation; null when no explanation applies."
                    },
                    "pages": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "queries": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "seeded": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "state",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "scanId",
            "completedAt",
            "layout",
            "pages",
            "linksTotal",
            "truncated",
            "findings",
            "openFindings",
            "opportunitiesTotal",
            "changes",
            "search"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "comparable": {
      "type": "boolean"
    },
    "reason": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "no_report",
            "no_baseline",
            "truncated"
          ],
          "description": "Recorded explanation; null when no explanation applies."
        },
        {
          "type": "null"
        }
      ],
      "description": "Recorded explanation; null when no explanation applies."
    },
    "differences": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "before": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "after": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "delta": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "kind",
          "before",
          "after",
          "delta"
        ],
        "additionalProperties": false
      }
    },
    "unknown": {
      "type": "object",
      "properties": {
        "report": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "baseline": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "report",
        "baseline"
      ],
      "additionalProperties": false
    },
    "changes": {
      "type": "object",
      "properties": {
        "window": {
          "type": "object",
          "properties": {
            "from": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "to": {
              "type": "string"
            }
          },
          "required": [
            "from",
            "to"
          ],
          "additionalProperties": false
        },
        "counts": {
          "type": "object",
          "properties": {
            "selected": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "published": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "verified": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "not_found": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "dismissed": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "resolved": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "stale": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "selected",
            "published",
            "verified",
            "not_found",
            "dismissed",
            "resolved",
            "stale"
          ],
          "additionalProperties": false
        },
        "dismissals": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "intended",
                      "not_useful",
                      "wrong",
                      "other"
                    ],
                    "description": "Recorded explanation; null when no explanation applies."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Recorded explanation; null when no explanation applies."
              },
              "by": {
                "type": "string",
                "enum": [
                  "member",
                  "agent"
                ]
              },
              "findingKind": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "reason",
              "by",
              "findingKind",
              "count"
            ],
            "additionalProperties": false
          }
        },
        "items": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Resource identifier returned by the operation."
              },
              "state": {
                "type": "string",
                "enum": [
                  "selected",
                  "published",
                  "verified",
                  "not_found",
                  "dismissed",
                  "resolved",
                  "stale"
                ],
                "description": "Saved lifecycle or evidence state, as enumerated for this record."
              },
              "goal": {
                "type": "string",
                "enum": [
                  "link",
                  "repair",
                  "unlink",
                  "page"
                ]
              },
              "subjectKind": {
                "type": "string",
                "enum": [
                  "suggestion",
                  "finding",
                  "action"
                ]
              },
              "findingKind": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "message": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pageUrl": {
                "type": "string"
              },
              "sourceUrl": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "targetUrl": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "anchor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dismissReason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "intended",
                      "not_useful",
                      "wrong",
                      "other"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "note": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "by": {
                "type": "string",
                "enum": [
                  "member",
                  "agent"
                ]
              },
              "checkedBy": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "page_check",
                      "scan"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verifiedAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "state",
              "goal",
              "subjectKind",
              "findingKind",
              "message",
              "pageUrl",
              "sourceUrl",
              "targetUrl",
              "anchor",
              "dismissReason",
              "note",
              "by",
              "checkedBy",
              "verifiedAt",
              "updatedAt"
            ],
            "additionalProperties": false,
            "description": "Records in this bounded page."
          },
          "description": "Records in this bounded page."
        },
        "truncated": {
          "type": "boolean"
        }
      },
      "required": [
        "window",
        "counts",
        "dismissals",
        "items",
        "truncated"
      ],
      "additionalProperties": false
    },
    "trend": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "scanId": {
            "type": "string"
          },
          "completedAt": {
            "type": "string"
          },
          "truncated": {
            "type": "boolean"
          },
          "pagesChecked": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pagesUnknown": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "findings": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        },
        "required": [
          "scanId",
          "completedAt",
          "truncated",
          "pagesChecked",
          "pagesUnknown",
          "findings"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "report",
    "baseline",
    "comparable",
    "reason",
    "differences",
    "unknown",
    "changes",
    "trend"
  ],
  "additionalProperties": false
}
