{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ringover/json-schema/ringover-scim-user-schema.json",
  "title": "scim_user",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ringover-scim-api-openapi.yml#/components/schemas/scim_user",
  "type": "object",
  "required": [
    "schemas",
    "userName"
  ],
  "properties": {
    "schemas": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "id": {
      "type": "string"
    },
    "externalId": {
      "type": "string",
      "description": "Client-defined identifier. Echoed on create only; not persisted, never returned on reads."
    },
    "userName": {
      "type": "string"
    },
    "name": {
      "$ref": "#/$defs/scim_name"
    },
    "displayName": {
      "type": "string",
      "description": "Read-only, derived from the name."
    },
    "title": {
      "type": "string"
    },
    "emails": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/scim_email"
      }
    },
    "roles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/scim_role"
      }
    },
    "active": {
      "type": "boolean"
    },
    "meta": {
      "$ref": "#/$defs/scim_meta"
    }
  },
  "$defs": {
    "scim_email": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "primary": {
          "type": "boolean"
        }
      }
    },
    "scim_meta": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string"
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Time the resource was created (xsd:dateTime). Currently omitted until available upstream."
        },
        "lastModified": {
          "type": "string",
          "format": "date-time",
          "description": "Time the resource was last modified. Currently omitted until available upstream."
        },
        "location": {
          "type": "string"
        },
        "version": {
          "type": "string",
          "description": "Weak entity-tag, usable as an If-Match precondition."
        }
      }
    },
    "scim_name": {
      "type": "object",
      "properties": {
        "formatted": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        }
      }
    },
    "scim_role": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "On input, the numeric Ringover profile id (discover it via GET /profiles)."
        },
        "display": {
          "type": "string",
          "description": "Profile name (read-only, returned by the server)."
        },
        "type": {
          "type": "string"
        },
        "primary": {
          "type": "boolean"
        }
      }
    }
  }
}