{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swift/json-schema/swift-pmi-participants-schema.json",
  "title": "PmiParticipants",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swift-swiftref-api-v4-openapi.yml#/components/schemas/PmiParticipants",
  "type": "object",
  "required": [
    "data",
    "links"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PmiParticipant"
      },
      "minItems": 1,
      "maxItems": 1000
    },
    "links": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      },
      "minItems": 1,
      "maxItems": 5
    }
  },
  "$defs": {
    "CountryCode": {
      "type": "string",
      "pattern": "^[a-zA-Z]{2}$",
      "description": "2-character ISO 3166-1 country code"
    },
    "Link": {
      "type": "object",
      "description": "Hypermedia link relation of the current resource/resources",
      "required": [
        "href",
        "rel",
        "type"
      ],
      "properties": {
        "href": {
          "type": "string",
          "format": "uri",
          "description": "URL representing resource/resources related to the current one/ones"
        },
        "rel": {
          "type": "string",
          "enum": [
            "first",
            "last",
            "next",
            "previous",
            "self",
            "describedby"
          ],
          "description": "How this link is related to the current resource/resources"
        },
        "type": {
          "type": "string",
          "enum": [
            "GET"
          ],
          "description": "HTTP method to use with this link"
        }
      },
      "additionalProperties": false
    },
    "PmiParticipant": {
      "type": "object",
      "description": "PMI participant general information",
      "required": [
        "service_id",
        "participant_id",
        "links"
      ],
      "properties": {
        "service_id": {
          "$ref": "#/$defs/PmiServiceId"
        },
        "alternative_service_ids": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PmiServiceId"
          }
        },
        "participant_id": {
          "$ref": "#/$defs/ReachPlusGenericAttribute"
        },
        "participant_name": {
          "$ref": "#/$defs/ReachPlusGenericAttribute"
        },
        "country_code": {
          "$ref": "#/$defs/CountryCode"
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Link"
          },
          "minItems": 1
        }
      },
      "additionalProperties": false
    },
    "PmiServiceId": {
      "$ref": "#/$defs/StringMax20"
    },
    "ReachPlusGenericAttribute": {
      "$ref": "#/$defs/StringMax255"
    },
    "StringMax20": {
      "description": "Generic string definition, from 1 to 20 characters long",
      "type": "string",
      "minLength": 1,
      "maxLength": 20
    },
    "StringMax255": {
      "description": "Generic string definition, from 1 to 255 characters long",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  }
}