{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://offeringprotocol.org/conformance/adapter-request.schema.json",
  "title": "ODP conformance adapter request",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "protocol_version",
    "sequence",
    "role",
    "vector",
    "case"
  ],
  "properties": {
    "protocol_version": {
      "const": "1"
    },
    "sequence": {
      "type": "integer",
      "minimum": 1
    },
    "role": {
      "enum": [
        "agent",
        "service"
      ]
    },
    "vector": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "title",
        "drafts",
        "category",
        "subject"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "drafts": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "category": {
          "type": "string",
          "minLength": 1
        },
        "subject": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "case": {
      "type": "object",
      "minProperties": 1
    }
  }
}
