{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "$id": "https://multiflexi.eu/schema/report.json",
  "schemaVersion": "0.1.0",
  "title": "MultiFlexi Application Report Schema",
  "type": "object",

  "properties": {
    "producer": {
      "type": "string",
      "description": "Name of the script/application that generated the report"
    },

    "status": {
      "type": "string",
      "enum": ["success", "error", "warning"],
      "description": "Application execution result"
    },

    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Application execution completion time in ISO8601 format"
    },

    "message": {
      "type": "string",
      "description": "Human-readable message about the execution result"
    },

    "artifacts": {
      "type": "object",
      "description": "Artifacts produced by the application. Keys correspond to names declared in the 'produces' section.",
      "additionalProperties": {
        "type": "array",
        "items": { "type": "string" },
        "description": "List of file paths, URLs, or other outputs"
      },
      "default": {}
    },

    "metrics": {
      "type": "object",
      "description": "Additional execution metrics (optional). Keys are metric names, values are numeric.",
      "additionalProperties": {
        "type": ["number", "integer", "string"]
      }
    }
  },

  "required": ["producer", "status", "timestamp"]
}
