Skip to content

Instantly share code, notes, and snippets.

@whitlockjc
Created December 15, 2025 19:23
Show Gist options
  • Select an option

  • Save whitlockjc/9a20a378bc06ed2c1691743c0d03c872 to your computer and use it in GitHub Desktop.

Select an option

Save whitlockjc/9a20a378bc06ed2c1691743c0d03c872 to your computer and use it in GitHub Desktop.
JSON Schema for SCIM 2.0
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/scim/core/2.0/Schema.json",
"title": "SCIM 2.0 Schema Resource (urn:ietf:params:scim:schemas:core:2.0:Schema)",
"type": "object",
"required": ["schemas", "id", "attributes"],
"properties": {
"schemas": {
"type": "array",
"description": "MUST contain urn:ietf:params:scim:schemas:core:2.0:Schema for Schema resources.",
"items": {
"type": "string"
},
"minItems": 1,
"contains": {
"const": "urn:ietf:params:scim:schemas:core:2.0:Schema"
}
},
"id": {
"type": "string",
"description": "Unique URI of the schema (e.g., urn:ietf:params:scim:schemas:core:2.0:User).",
"format": "uri"
},
"name": {
"type": "string",
"description": "Human-readable name of the schema (e.g., 'User', 'Group')."
},
"description": {
"type": "string",
"description": "Human-readable description of the schema."
},
"attributes": {
"type": "array",
"description": "Attribute definitions for this schema.",
"items": { "$ref": "#/$defs/attribute" },
"minItems": 1
}
},
"additionalProperties": true,
"$defs": {
"attribute": {
"type": "object",
"description": "SCIM attribute definition as described in RFC 7643 §7.",
"required": ["name", "type"],
"properties": {
"name": {
"type": "string",
"description": "Attribute name (ATTRNAME).",
"pattern": "^[A-Za-z][A-Za-z0-9$_-]*$"
},
"type": {
"type": "string",
"description": "Attribute data type.",
"enum": [
"string",
"boolean",
"decimal",
"integer",
"dateTime",
"binary",
"reference",
"complex"
]
},
"subAttributes": {
"type": "array",
"description": "Sub-attributes for complex attributes. Same schema as attributes.",
"items": { "$ref": "#/$defs/attribute" }
},
"multiValued": {
"type": "boolean",
"description": "Whether this attribute is multi-valued."
},
"description": {
"type": "string",
"description": "Human-readable description of the attribute."
},
"required": {
"type": "boolean",
"description": "Whether the attribute is required."
},
"canonicalValues": {
"type": "array",
"description": "Suggested canonical values (e.g., 'work', 'home').",
"items": {
"type": "string"
}
},
"caseExact": {
"type": "boolean",
"description": "Whether string values are case sensitive."
},
"mutability": {
"type": "string",
"description": "When and how values may be (re)defined.",
"enum": [
"readOnly",
"readWrite",
"immutable",
"writeOnly"
]
},
"returned": {
"type": "string",
"description": "When the attribute is returned by the service provider.",
"enum": [
"always",
"never",
"default",
"request"
]
},
"uniqueness": {
"type": "string",
"description": "How the service provider enforces uniqueness.",
"enum": [
"none",
"server",
"global"
]
},
"referenceTypes": {
"type": "array",
"description": "Allowed SCIM resource types or categories for 'reference' attributes.",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment