{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/snyk/main/json-schema/snyk-collection-relationships-schema.json",
  "title": "CollectionRelationships",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snyk-collection-api-openapi.yml#/components/schemas/CollectionRelationships",
  "additionalProperties": false,
  "properties": {
    "created_by_user": {
      "properties": {
        "data": {
          "properties": {
            "id": {
              "description": "ID of the user that created the collection. Null for auto-collections.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "type": {
              "enum": [
                "user"
              ]
            }
          },
          "required": [
            "type",
            "id"
          ],
          "type": "object"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    },
    "org": {
      "properties": {
        "data": {
          "properties": {
            "id": {
              "description": "ID of the org that this collection belongs to",
              "format": "uuid",
              "type": "string"
            },
            "type": {
              "enum": [
                "org"
              ]
            }
          },
          "required": [
            "type",
            "id"
          ],
          "type": "object"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  },
  "required": [
    "org",
    "created_by_user"
  ],
  "type": "object"
}