$schema: https://json-schema.org/draft/2020-12/schema
$id: https://example.invalid/sadave/schemas/exceptions_health_v1.schema.json
title: Sadave Exceptions Health (v1)
type: object
additionalProperties: false
required:
  - schema_id
  - schema_version
  - generated_at_utc
  - generator
  - workspace
  - data
properties:
  schema_id:
    const: sadave.exceptions_health.v1
  schema_version:
    const: "1"
  generated_at_utc:
    type: string
    format: date-time
  generator:
    type: object
    additionalProperties: false
    required:
      - name
      - version
    properties:
      name:
        const: sadave
      version:
        type: string
  workspace:
    type: object
    additionalProperties: false
    required:
      - workspace_root
      - subproject_root
      - snapshot
    properties:
      workspace_root:
        type: string
      subproject_root:
        type: string
      snapshot:
        type: object
        additionalProperties: false
        required:
          - kind
          - value
        properties:
          kind:
            type: string
            enum: [git_head, git_tree, fs]
          value:
            type: string
  data:
    type: object
    additionalProperties: false
    required:
      - status
      - summary
      - checks
      - notes
    properties:
      status:
        type: string
        enum: [ok, fail]
      summary:
        type: object
        additionalProperties: false
        required:
          - items_total
          - suppressions_total
          - waivers_total
          - drift_total
        properties:
          items_total:
            type: integer
            minimum: 0
          suppressions_total:
            type: integer
            minimum: 0
          waivers_total:
            type: integer
            minimum: 0
          drift_total:
            type: integer
            minimum: 0
      checks:
        type: array
        items:
          type: object
          additionalProperties: false
          required:
            - check_id
            - status
            - message
          properties:
            check_id:
              type: string
            status:
              type: string
              enum: [ok, fail]
            message:
              type: string
      notes:
        type: array
        items:
          type: string
