{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/twenty/json-schema/twenty-relation-metadata-list-response-schema.json",
  "title": "RelationMetadataListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twenty-relations-api-openapi.yml#/components/schemas/RelationMetadataListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "relations": {
          "type": "object",
          "properties": {
            "edges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "node": {
                    "$ref": "#/$defs/RelationMetadata"
                  },
                  "cursor": {
                    "type": "string"
                  }
                }
              }
            },
            "pageInfo": {
              "$ref": "#/$defs/PageInfo"
            },
            "totalCount": {
              "type": "integer"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "PageInfo": {
      "type": "object",
      "properties": {
        "hasNextPage": {
          "type": "boolean"
        },
        "hasPreviousPage": {
          "type": "boolean"
        },
        "startCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "endCursor": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "RelationMetadata": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "relationType": {
          "type": "string",
          "enum": [
            "ONE_TO_MANY",
            "MANY_TO_ONE",
            "ONE_TO_ONE"
          ]
        },
        "fromObjectMetadataId": {
          "type": "string",
          "format": "uuid"
        },
        "toObjectMetadataId": {
          "type": "string",
          "format": "uuid"
        },
        "fromFieldMetadataId": {
          "type": "string",
          "format": "uuid"
        },
        "toFieldMetadataId": {
          "type": "string",
          "format": "uuid"
        }
      }
    }
  }
}