{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ivans/json-schema/ivans-paginated-structure-list-schema.json",
  "title": "PaginatedStructureList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ivans-structures-api-openapi.yml#/components/schemas/PaginatedStructureList",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "previous": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Structure"
      }
    }
  },
  "$defs": {
    "Structure": {
      "type": "object",
      "properties": {
        "agency": {
          "$ref": "#/$defs/StructureChild"
        },
        "branch": {
          "$ref": "#/$defs/StructureChild"
        }
      },
      "required": [
        "agency",
        "branch"
      ]
    },
    "StructureChild": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "id",
        "name"
      ]
    }
  }
}