﻿{
  "definitions": {
    "DSattr": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "flexberryType": {
          "type": [
            "string",
            "null"
          ]
        },
        "notNull": {
          "type": "boolean"
        },
        "defaultValue": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "type",
        "flexberryType",
        "notNull",
        "defaultValue"
      ]
    },
    "DSbelongsTo": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "polymorphic": {
          "type": "boolean"
        },
        "presence": {
          "type": "boolean"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "relatedTo": {
          "type": [
            "string",
            "null"
          ]
        },
        "inverse": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "polymorphic",
        "presence",
        "name",
        "relatedTo",
        "inverse"
      ]
    },
    "DShasMany": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "relatedTo": {
          "type": [
            "string",
            "null"
          ]
        },
        "inverse": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "relatedTo",
        "inverse"
      ]
    },
    "ProjectionForModel": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "type": [
            "string",
            "null"
          ]
        },
        "attrs": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "caption": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hidden": {
                "type": "boolean"
              },
              "index": {
                "type": "integer"
              }
            },
            "required": [
              "name",
              "caption",
              "hidden",
              "index"
            ]
          }
        },
        "belongsTo": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "lookupValue": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lookupValueField": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "relationName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "belongsTo": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/definitions/ProjectionForModel/properties/belongsTo/items/0"
                }
              },
              "hidden": {
                "type": "boolean"
              },
              "attrs": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/definitions/ProjectionForModel/properties/attrs/items/0"
                }
              },
              "index": {
                "type": "integer"
              },
              "caption": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "relatedTo": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inverse": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "lookupValue",
              "lookupValueField",
              "relationName",
              "belongsTo",
              "hidden",
              "attrs",
              "index",
              "caption",
              "name",
              "relatedTo",
              "inverse"
            ]
          }
        },
        "hasMany": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "projectionName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "caption": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "relatedTo": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inverse": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "projectionName",
              "caption",
              "name",
              "relatedTo",
              "inverse"
            ]
          }
        }
      },
      "required": [
        "name",
        "modelName",
        "attrs",
        "belongsTo",
        "hasMany"
      ]
    },
    "ProjAttr": {
      "$ref": "#/definitions/ProjectionForModel/properties/attrs/items/0"
    },
    "ProjBelongsTo": {
      "$ref": "#/definitions/ProjectionForModel/properties/belongsTo/items/0"
    },
    "ProjHasMany": {
      "$ref": "#/definitions/ProjectionForModel/properties/hasMany/items/0"
    }
  },
  "type": "object",
  "properties": {
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "modelName": {
      "type": [
        "string",
        "null"
      ]
    },
    "className": {
      "type": [
        "string",
        "null"
      ]
    },
    "parentModelName": {
      "type": [
        "string",
        "null"
      ]
    },
    "parentClassName": {
      "type": [
        "string",
        "null"
      ]
    },
    "attrs": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/DSattr"
      }
    },
    "belongsTo": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/DSbelongsTo"
      }
    },
    "hasMany": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/DShasMany"
      }
    },
    "projections": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/ProjectionForModel"
      }
    }
  },
  "required": [
    "name",
    "modelName",
    "className",
    "parentModelName",
    "parentClassName",
    "attrs",
    "belongsTo",
    "hasMany",
    "projections"
  ]
}