{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mri-software/json-schema/mri-software-staff-role-type-response-schema.json",
  "title": "StaffRoleTypeResponse",
  "description": "Employee role type. When no location_id filter is provided, includes a 'locations' array showing which locations the role is assigned to. When filtered by location_id, returns a flat list where id is the role ID and created/modified are from the location_role assignment record.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mri-software-employees-api-openapi.yml#/components/schemas/StaffRoleTypeResponse",
  "properties": {
    "id": {
      "description": "Role ID.",
      "type": "integer",
      "format": "int32"
    },
    "name": {
      "description": "Name of the role",
      "type": "string",
      "format": "string"
    },
    "created": {
      "description": "Date and time the role was created",
      "type": "string",
      "format": "date-time"
    },
    "modified": {
      "description": "Date and time the role was last modified",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "locations": {
      "description": "Locations this role is assigned to. Only returned when no location_id filter is applied.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "type": "object"
}