{
  "$id": "https://rumankazi.github.io/flowpact/schemas/report/v1.json",
  "title": "flowpact report",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "meta": {
      "type": "object",
      "properties": {
        "tool": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "schemas": {
          "type": "object",
          "properties": {
            "config": {
              "type": "number"
            },
            "contract": {
              "type": "number"
            },
            "report": {
              "type": "number"
            }
          },
          "required": [
            "config",
            "contract",
            "report"
          ],
          "additionalProperties": false
        },
        "node": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "root": {
          "type": "string"
        },
        "configFile": {
          "type": "string"
        },
        "repository": {
          "type": "string"
        },
        "durationMs": {
          "type": "number",
          "minimum": 0
        }
      },
      "required": [
        "tool",
        "version",
        "schemas",
        "node",
        "platform",
        "root",
        "durationMs"
      ],
      "additionalProperties": false
    },
    "summary": {
      "type": "object",
      "properties": {
        "errors": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "warnings": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "infos": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "total": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "workflows": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "actions": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "jobs": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "matrixCombinations": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "graph": {
          "type": "object",
          "properties": {
            "nodes": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "edges": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "nodes",
            "edges"
          ],
          "additionalProperties": false
        },
        "byCode": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "byFile": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "suppressed": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "errors",
        "warnings",
        "infos",
        "total",
        "workflows",
        "actions",
        "jobs",
        "matrixCombinations",
        "graph",
        "byCode",
        "byFile",
        "suppressed"
      ],
      "additionalProperties": false
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9]{1,9}\\d{3}$"
          },
          "name": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "error",
              "warning",
              "info"
            ]
          },
          "category": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "loc": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string"
              },
              "line": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "column": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "endLine": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "endColumn": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "file",
              "line",
              "column",
              "endLine",
              "endColumn"
            ],
            "additionalProperties": false
          },
          "related": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "loc": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "string"
                    },
                    "line": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "column": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endLine": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endColumn": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "file",
                    "line",
                    "column",
                    "endLine",
                    "endColumn"
                  ],
                  "additionalProperties": false
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "loc",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "combos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "symbol": {
            "type": "string"
          },
          "why": {
            "type": "string"
          },
          "fix": {
            "type": "string"
          },
          "docsUrl": {
            "type": "string",
            "format": "uri"
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{16}$"
          }
        },
        "required": [
          "code",
          "name",
          "severity",
          "category",
          "message",
          "loc",
          "related",
          "why",
          "fix",
          "docsUrl",
          "fingerprint"
        ],
        "additionalProperties": false
      }
    },
    "suppressed": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9]{1,9}\\d{3}$"
          },
          "name": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "error",
              "warning",
              "info"
            ]
          },
          "category": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "loc": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string"
              },
              "line": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "column": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "endLine": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "endColumn": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "file",
              "line",
              "column",
              "endLine",
              "endColumn"
            ],
            "additionalProperties": false
          },
          "related": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "loc": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "string"
                    },
                    "line": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "column": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endLine": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "endColumn": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "file",
                    "line",
                    "column",
                    "endLine",
                    "endColumn"
                  ],
                  "additionalProperties": false
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "loc",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "combos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "symbol": {
            "type": "string"
          },
          "why": {
            "type": "string"
          },
          "fix": {
            "type": "string"
          },
          "docsUrl": {
            "type": "string",
            "format": "uri"
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{16}$"
          },
          "override": {
            "type": "object",
            "properties": {
              "index": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "reason": {
                "type": "string"
              },
              "expires": {
                "type": "string"
              },
              "owner": {
                "type": "string"
              }
            },
            "required": [
              "index",
              "reason"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "code",
          "name",
          "severity",
          "category",
          "message",
          "loc",
          "related",
          "why",
          "fix",
          "docsUrl",
          "fingerprint",
          "override"
        ],
        "additionalProperties": false
      }
    },
    "contracts": {
      "type": "object",
      "properties": {
        "drift": {
          "type": "boolean"
        },
        "breaking": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "counts": {
          "type": "object",
          "properties": {
            "create": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "update": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "delete": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "unchanged": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "create",
            "update",
            "delete",
            "unchanged"
          ],
          "additionalProperties": false
        },
        "entries": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "create",
                  "update",
                  "delete",
                  "unchanged"
                ]
              },
              "unit": {
                "type": "string"
              },
              "invalid": {
                "type": "string"
              },
              "changes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "breaking": {
                      "type": "boolean"
                    },
                    "path": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "breaking",
                    "path",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "file",
              "status",
              "changes"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "drift",
        "breaking",
        "counts",
        "entries"
      ],
      "additionalProperties": false
    },
    "impact": {
      "type": "object",
      "properties": {
        "baseline": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "ref",
                "release"
              ]
            },
            "ref": {
              "type": "string"
            },
            "commit": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "ref",
            "commit"
          ],
          "additionalProperties": false
        },
        "required": {
          "type": "string",
          "enum": [
            "none",
            "patch",
            "minor",
            "major"
          ]
        },
        "declared": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "explicit",
                "title",
                "labels",
                "version"
              ]
            },
            "value": {
              "type": "string"
            },
            "level": {
              "type": "string",
              "enum": [
                "none",
                "patch",
                "minor",
                "major"
              ]
            }
          },
          "required": [
            "kind",
            "value",
            "level"
          ],
          "additionalProperties": false
        },
        "ok": {
          "type": "boolean"
        },
        "changes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "level": {
                "type": "string",
                "enum": [
                  "none",
                  "patch",
                  "minor",
                  "major"
                ]
              },
              "certain": {
                "type": "boolean"
              },
              "message": {
                "type": "string"
              },
              "loc": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string"
                  },
                  "line": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "column": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "endLine": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "endColumn": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "file",
                  "line",
                  "column",
                  "endLine",
                  "endColumn"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "unit",
              "kind",
              "level",
              "certain",
              "message",
              "loc"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "baseline",
        "required",
        "ok",
        "changes"
      ],
      "additionalProperties": false
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "error",
              "warning",
              "info",
              "off"
            ]
          }
        },
        "required": [
          "code",
          "name",
          "severity"
        ],
        "additionalProperties": false
      }
    },
    "graph": {
      "type": "object",
      "properties": {
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "unit": {
                "type": "string"
              },
              "loc": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string"
                  },
                  "line": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "column": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "endLine": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "endColumn": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "file",
                  "line",
                  "column",
                  "endLine",
                  "endColumn"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "kind",
              "label"
            ],
            "additionalProperties": false
          }
        },
        "edges": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "loc": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string"
                  },
                  "line": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "column": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "endLine": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "endColumn": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "file",
                  "line",
                  "column",
                  "endLine",
                  "endColumn"
                ],
                "additionalProperties": false
              },
              "siteId": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "from",
              "to",
              "kind"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "nodes",
        "edges"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "$schema",
    "meta",
    "summary",
    "findings",
    "suppressed",
    "rules"
  ],
  "additionalProperties": false
}
