{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cosuno/json-schema/cosuno-create-review-requests-response-schema.json",
  "title": "CreateReviewRequestsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cosuno-subcontractor-reviews-api-openapi.yml#/components/schemas/CreateReviewRequestsResponse",
  "properties": {
    "reviewObjectId": {
      "type": "string",
      "description": "ID of the review object the requests were created under."
    },
    "assignments": {
      "items": {
        "$ref": "#/$defs/ReviewAssignmentResponse"
      },
      "type": "array",
      "description": "Created review requests, grouped by template."
    }
  },
  "required": [
    "reviewObjectId",
    "assignments"
  ],
  "type": "object",
  "additionalProperties": false,
  "$defs": {
    "CreatedReviewRequest": {
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the created review request."
        },
        "reviewerId": {
          "type": "string",
          "description": "ID of the reviewer the request was created for."
        }
      },
      "required": [
        "id",
        "reviewerId"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "ReviewAssignmentResponse": {
      "properties": {
        "templateId": {
          "type": "string",
          "description": "ID of the review template this group of requests was created for."
        },
        "requests": {
          "items": {
            "$ref": "#/$defs/CreatedReviewRequest"
          },
          "type": "array",
          "description": "One entry per reviewer in the corresponding input assignment."
        }
      },
      "required": [
        "templateId",
        "requests"
      ],
      "type": "object",
      "additionalProperties": false
    }
  }
}