{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://redbook.fun/specification/1.0/schemas/participant-authoring-policy.schema.json",
  "title": "Portable extension authoring participation policy",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "action": {
        "type": "string",
        "pattern": "^(?!(?:rb|reader):)[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+(?![\\s\\S])"
      },
      "actors": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "$rb": {
              "const": "reference"
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "$rb",
            "id"
          ],
          "additionalProperties": false
        },
        "minItems": 0,
        "uniqueItems": true
      },
      "basis": {
        "enum": [
          "owner",
          "active-members"
        ]
      }
    },
    "required": [
      "action"
    ],
    "additionalProperties": false,
    "oneOf": [
      {
        "required": [
          "actors"
        ],
        "not": {
          "required": [
            "basis"
          ]
        }
      },
      {
        "required": [
          "basis"
        ],
        "not": {
          "required": [
            "actors"
          ]
        }
      }
    ]
  },
  "minItems": 0,
  "uniqueItems": true
}
