{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eurobase-dev/json-schema/eurobase-dev-function-logs-response-schema.json",
  "title": "FunctionLogsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eurobase-dev-function-deployments-api-openapi.yml#/components/schemas/FunctionLogsResponse",
  "type": "object",
  "required": [
    "functionDeploymentId",
    "source",
    "entries",
    "logs"
  ],
  "properties": {
    "functionDeploymentId": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FunctionLogEntry"
      }
    },
    "logs": {
      "type": "string"
    }
  },
  "$defs": {
    "FunctionLogEntry": {
      "type": "object",
      "required": [
        "id",
        "level",
        "message",
        "observedAt"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "observedAt": {
          "type": "string",
          "format": "date-time"
        },
        "payload": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "category": {
                  "type": "string"
                },
                "functionDeploymentId": {
                  "type": "string"
                },
                "method": {
                  "type": "string"
                },
                "pathClass": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string"
                },
                "failureCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "httpStatus": {
                  "type": "integer"
                },
                "totalDurationMs": {
                  "type": "integer"
                },
                "crashRecovered": {
                  "type": "boolean"
                }
              }
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}