{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-permission-create-request-schema.json",
  "title": "PermissionCreateRequest",
  "description": "Request body for creating a new 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/PermissionCreateRequest",
  "type": "object",
  "required": [
    "resource",
    "action"
  ],
  "properties": {
    "resource": {
      "type": "string",
      "maxLength": 100,
      "pattern": "\\S",
      "description": "Name of the resource this permission will govern (e.g., 'user', 'roster')."
    },
    "action": {
      "type": "string",
      "maxLength": 100,
      "pattern": "\\S",
      "description": "Name of the action this permission will grant on the resource (e.g., 'read', 'create')."
    },
    "description": {
      "type": "string",
      "maxLength": 500,
      "description": "Optional human-readable explanation of what the permission allows."
    }
  }
}