{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "const": "owp-market-local/0.2"
    },
    "capability": {
      "type": "string",
      "enum": [
        "writing/brief",
        "weather/current"
      ]
    },
    "media_types": {
      "minItems": 1,
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "text/plain",
          "text/markdown",
          "application/json"
        ]
      }
    },
    "min_reward": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000
    },
    "max_in_flight": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2
    },
    "round_id": {
      "anyOf": [
        {
          "type": "string",
          "allOf": [
            {
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "pattern": "^[a-f0-9-]+$"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "profile",
    "capability",
    "media_types",
    "min_reward",
    "max_in_flight",
    "round_id"
  ],
  "additionalProperties": false,
  "description": "Subscribe to current and future fixtures. Null round_id matches any round; min_reward uses TEST_CREDIT. Poll /v1/matches to dispatch.",
  "title": "SubscriptionRequest",
  "$comment": "owp-market-local/0.2; fictional loopback market, non-redeemable test credits only."
}
