{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-gouv-fr/json-schema/api-gouv-fr-follow-page-schema.json",
  "title": "FollowPage",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-gouv-fr-dataservices-api-openapi.yml#/components/schemas/FollowPage",
  "properties": {
    "data": {
      "description": "The page data",
      "items": {
        "$ref": "#/$defs/Follow__read"
      },
      "type": "array"
    },
    "next_page": {
      "description": "The next page URL if exists",
      "type": "string"
    },
    "page": {
      "description": "The current page",
      "minimum": 1,
      "type": "integer"
    },
    "page_size": {
      "description": "The page size used for pagination",
      "minimum": 0,
      "type": "integer"
    },
    "previous_page": {
      "description": "The previous page URL if exists",
      "type": "string"
    },
    "total": {
      "description": "The total paginated items",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "page",
    "page_size",
    "total"
  ],
  "type": "object",
  "$defs": {
    "BaseReference": {
      "properties": {
        "class": {
          "description": "The object class",
          "type": "string"
        },
        "id": {
          "description": "The object unique identifier",
          "type": "string"
        }
      },
      "required": [
        "class",
        "id"
      ],
      "type": "object"
    },
    "Follow__read": {
      "properties": {
        "follower": {
          "allOf": [
            {
              "$ref": "#/$defs/UserReference"
            }
          ],
          "description": "The follower",
          "readOnly": true
        },
        "id": {
          "readOnly": true,
          "type": "string"
        },
        "since": {
          "description": "The date from which the user started following",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "follower",
        "id",
        "since"
      ],
      "type": "object"
    },
    "UserReference": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseReference"
        },
        {
          "properties": {
            "avatar": {
              "description": "URL of the image",
              "readOnly": true,
              "type": "string"
            },
            "avatar_thumbnail": {
              "description": "URL of the cropped and squared image (500x500)",
              "readOnly": true,
              "type": "string"
            },
            "deleted": {
              "description": "The date the account was deleted, null for a live account",
              "format": "date-time",
              "readOnly": true,
              "type": "string"
            },
            "first_name": {
              "maxLength": 255,
              "type": "string"
            },
            "last_name": {
              "maxLength": 255,
              "type": "string"
            },
            "page": {
              "description": "Link to the udata web page for this user",
              "readOnly": true,
              "type": "string"
            },
            "slug": {
              "maxLength": 255,
              "readOnly": true,
              "type": "string"
            },
            "uri": {
              "description": "Link to the API endpoint for this user",
              "readOnly": true,
              "type": "string"
            }
          },
          "required": [
            "first_name",
            "last_name",
            "slug"
          ],
          "type": "object"
        }
      ]
    }
  }
}