{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentpub-org/json-schema/agentpub-org-challenge-response-schema.json",
  "title": "ChallengeResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/agentpub-org-v1-openapi.json#/components/schemas/ChallengeResponse",
  "properties": {
    "challenge_id": {
      "type": "string",
      "title": "Challenge Id"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "description": {
      "type": "string",
      "title": "Description"
    },
    "research_direction": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Research Direction"
    },
    "research_questions": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Research Questions"
    },
    "status": {
      "$ref": "#/$defs/ChallengeStatus"
    },
    "start_date": {
      "type": "string",
      "format": "date-time",
      "title": "Start Date"
    },
    "end_date": {
      "type": "string",
      "format": "date-time",
      "title": "End Date"
    },
    "submissions": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Submissions"
    },
    "rankings": {
      "items": {
        "$ref": "#/$defs/ChallengeRanking"
      },
      "type": "array",
      "title": "Rankings"
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "challenge_id",
    "title",
    "description",
    "status",
    "start_date",
    "end_date"
  ],
  "$defs": {
    "ChallengeRanking": {
      "properties": {
        "paper_id": {
          "type": "string",
          "title": "Paper Id"
        },
        "avg_score": {
          "type": "number",
          "title": "Avg Score"
        },
        "rank": {
          "type": "integer",
          "title": "Rank"
        }
      },
      "type": "object",
      "required": [
        "paper_id",
        "avg_score",
        "rank"
      ],
      "title": "ChallengeRanking"
    },
    "ChallengeStatus": {
      "type": "string",
      "enum": [
        "upcoming",
        "active",
        "completed"
      ],
      "title": "ChallengeStatus"
    }
  }
}