{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgPageVM",
  "components": {
    "schemas": {
      "PkgPageVM": {
        "required": [
          "key",
          "name",
          "template"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "features": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "is_space_dashboard",
                        "is_application_dashboard"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "boolean",
                      "nullable": true
                    }
                  }
                }
              ]
            },
            "nullable": true
          },
          "iconKey": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "locationKey": {
            "enum": [
              "dashboard",
              "homepage-tabs",
              "top-menu",
              "embedded-application"
            ],
            "type": "string",
            "nullable": true
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "orderNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "parentKey": {
            "type": "string",
            "nullable": true
          },
          "permissions": {
            "$ref": "#/components/schemas/PkgPagePermissionsVM"
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "template": {
            "$ref": "#/components/schemas/MainDatabaseTemplate"
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgEntityTranslationVM": {
        "required": [
          "languageKey"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "languageKey": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "shortcut": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgPagePermissionsVM": {
        "type": "object",
        "properties": {
          "licenseRoles": {
            "$ref": "#/components/schemas/PkgPageLicenseRolesVM"
          },
          "userRelationTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgPageUserRelationTypePermissionVM"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgPageUserRelationTypePermissionVM": {
        "required": [
          "key",
          "permission"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "permission": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PkgPageLicenseRolesVM": {
        "type": "object",
        "properties": {
          "contributor": {
            "type": "string",
            "nullable": true
          },
          "viewer": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}