{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-permission-update-request-schema.json",
  "title": "PermissionUpdateRequest",
  "description": "Request body for updating a permission",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-permission-api-openapi.yml#/components/schemas/PermissionUpdateRequest",
  "type": "object",
  "required": [
    "resource",
    "action"
  ],
  "properties": {
    "resource": {
      "type": "string",
      "maxLength": 100,
      "description": "Name of the resource this permission will govern (e.g., 'user', 'roster'). At most 100 characters. Required on every call: PUT /permissions/{id} is a full replace, so this value must always be supplied."
    },
    "action": {
      "type": "string",
      "maxLength": 100,
      "description": "Name of the action this permission will grant on the resource (e.g., 'read', 'create'). At most 100 characters. Required on every call: PUT /permissions/{id} is a full replace, so this value must always be supplied."
    },
    "description": {
      "type": "string",
      "maxLength": 500,
      "description": "Human-readable explanation of what the permission allows. At most 500 characters. Optional: since PUT /permissions/{id} is a full replace, omitting this value clears any existing description."
    }
  }
}