{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-update-model-roles-request-schema.json",
  "title": "UpdateModelRolesRequest",
  "description": "Replaces the entire model role assignment map. Roles absent from this object are deleted — send an empty `roles` object to clear all role assignments.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeshub-configuration-manager-api-openapi.yml#/components/schemas/UpdateModelRolesRequest",
  "type": "object",
  "required": [
    "roles"
  ],
  "properties": {
    "roles": {
      "type": "object",
      "description": "The complete desired role map. Replaces the stored map in full; omit a key to delete that role assignment.",
      "additionalProperties": {
        "$ref": "#/$defs/ModelRoleAssignment"
      }
    }
  },
  "$defs": {
    "ModelRoleAssignment": {
      "type": "object",
      "description": "Identifies which configured model is assigned to a named role.",
      "required": [
        "modelType",
        "modelKey"
      ],
      "properties": {
        "modelType": {
          "type": "string",
          "description": "The model-type bucket the assigned model lives in (e.g. `llm`, `slm`, `multiModal`)."
        },
        "modelKey": {
          "type": "string",
          "description": "UUID of the model entry within the bucket."
        }
      }
    }
  }
}