{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "datasource": {
      "type": "object",
      "properties": {
        "url_prefix": {
          "type": "string"
        }
      },
      "required": [
        "url_prefix"
      ]
    },
    "fields": {
      "type": "object",
      "properties": {
        "nom": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "field": {
              "type": "string"
            },
            "sortable": {
              "type": "boolean"
            }
          },
          "required": [
            "label",
            "field",
            "sortable"
          ]
        },
        "prenom": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "field": {
              "type": "string"
            },
            "sortable": {
              "type": "boolean"
            }
          },
          "required": [
            "label",
            "field",
            "sortable"
          ]
        }
      },
      "required": [
        "nom",
        "prenom"
      ]
    },
    "itemActions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "enum": [
              "Voir",
              "PDF"
            ]
          },
          "icon": {
            "type": "string",
            "enum": [
              "plus"
            ]
          },
          "bulk": {
            "type": "boolean"
          },
          "confirm": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "path": {
            "type": "object",
            "properties": {
              "route": {
                "type": "string"
              }
            },
            "required": [
              "route"
            ]
          }
        },
        "required": [
          "id",
          "label",
          "icon"
        ]
      }
    },
    "listView": {
      "type": "object",
      "properties": {
        "datasource": {
          "type": "string"
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "listActions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "icon": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "label",
              "icon"
            ]
          }
        },
        "itemActions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "item_per_page": {
          "type": "integer"
        },
        "rupt_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "datasource",
        "fields",
        "listActions",
        "itemActions",
        "item_per_page",
        "rupt_fields"
      ]
    },
    "showView": {
      "type": "object",
      "properties": {
        "datasource": {
          "type": "string"
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "itemActions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "brick": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "list": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "options": {
                      "type": "object",
                      "properties": {
                        "datasource": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "type",
                    "options"
                  ]
                }
              }
            },
            "required": [
              "type"
            ]
          }
        }
      },
      "required": [
        "datasource",
        "fields",
        "itemActions",
        "brick"
      ]
    },
    "editView": {
      "type": "object",
      "properties": {
        "form": {
          "type": "object",
          "properties": {
            "schema": {
              "type": "object",
              "properties": {
                "fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "input"
                        ]
                      },
                      "inputType": {
                        "type": "string",
                        "enum": [
                          "text"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "model": {
                        "type": "string"
                      },
                      "readonly": {
                        "type": "boolean"
                      },
                      "disabled": {
                        "type": "boolean"
                      },
                      "placeholder": {
                        "type": "string"
                      },
                      "featured": {
                        "type": "boolean"
                      },
                      "required": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "type",
                      "inputType",
                      "label",
                      "model"
                    ]
                  }
                }
              },
              "required": [
                "fields"
              ]
            }
          },
          "required": [
            "schema"
          ]
        }
      },
      "required": [
        "form"
      ]
    }
  },
  "required": [
    "datasource",
    "fields",
    "itemActions",
    "listView",
    "showView",
    "editView"
  ]
}