{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Chunks list",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "title": "Chunk",
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "material_position": {
            "type": "number"
          },
          "type": {
            "title": "Chunk type",
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "name": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "display_name"
            ]
          },
          "translatable": {
            "type": "boolean"
          },
          "body": {
            "type": "string"
          },
          "translations": {
            "title": "Translations list",
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "title": "Translation",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "translator": {
                      "title": "Translation author",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "nickname": {
                          "type": "string"
                        },
                        "avatar": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "nickname",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "body": {
                      "type": "string"
                    },
                    "rating": {
                      "type": "number"
                    },
                    "rates": {
                      "title": "List of translation rates",
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "title": "Translation rate",
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number"
                              },
                              "rater": {
                                "title": "Rate author",
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "number"
                                  },
                                  "nickname": {
                                    "type": "string"
                                  },
                                  "avatar": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "created_at": {
                                    "type": "string"
                                  },
                                  "updated_at": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "nickname",
                                  "created_at",
                                  "updated_at"
                                ]
                              },
                              "value": {
                                "type": "number"
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "updated_at": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "rater",
                              "value",
                              "created_at",
                              "updated_at"
                            ]
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "translator",
                    "body",
                    "rating",
                    "rates",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            },
            "required": [
              "data"
            ]
          },
          "comments": {
            "title": "Comments list",
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "title": "Chunk comment",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "commentator": {
                      "title": "Comment author",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "nickname": {
                          "type": "string"
                        },
                        "avatar": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "nickname",
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "commentator",
                    "body",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            },
            "required": [
              "data"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "material_position",
          "type",
          "translatable",
          "body",
          "comments",
          "created_at",
          "updated_at"
        ]
      }
    }
  },
  "required": [
    "data"
  ]
}