{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/signicat/main/json-schema/signicat-membership-resource-schema.json",
  "title": "MembershipResource",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signicat-siam-openapi.yml#/components/schemas/MembershipResource",
  "type": "object",
  "properties": {
    "schemas": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "id": {
      "type": [
        "string",
        "null"
      ]
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ]
    },
    "displayName": {
      "type": [
        "string",
        "null"
      ]
    },
    "active": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "roles": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ScimRole"
      }
    },
    "organization": {
      "$ref": "#/$defs/ScimOrganization"
    },
    "user": {
      "$ref": "#/$defs/ScimSubject"
    },
    "customAttributes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ScimInboundCustomAttribute"
      }
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    }
  },
  "$defs": {
    "Meta": {
      "type": "null",
      "properties": {
        "resourceType": {
          "type": [
            "string",
            "null"
          ]
        },
        "created": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "lastModified": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "location": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdMillis": {
          "$ref": "#/$defs/Meta",
          "writeOnly": true
        },
        "lastModifiedMillis": {
          "$ref": "#/$defs/Meta",
          "writeOnly": true
        }
      }
    },
    "ScimInboundCustomAttribute": {
      "type": "object",
      "properties": {
        "value": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "ScimOrganization": {
      "type": "null",
      "properties": {
        "value": {
          "type": "string"
        },
        "display": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "GROUP",
            "ORGANIZATION",
            "ACCOUNT"
          ]
        }
      }
    },
    "ScimRole": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "display": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "ScimSubject": {
      "type": "null",
      "properties": {
        "value": {
          "type": "string"
        },
        "display": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "MACHINE",
            "USER",
            "EXTERNAL_USER"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}