{
  "$id": "https://www.roadmapstar.com/roadmap.schema.json",
  "title": "RoadmapStar .roadmap.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "title": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "properties": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "longtext",
              "number",
              "select",
              "date",
              "url",
              "checkbox"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "title",
              "startDate",
              "endDate",
              "stage",
              "milestone"
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string"
                },
                "color": {
                  "type": "string",
                  "enum": [
                    "slate",
                    "blue",
                    "teal",
                    "green",
                    "amber",
                    "orange",
                    "red",
                    "violet"
                  ]
                }
              },
              "required": [
                "id",
                "label",
                "color"
              ],
              "additionalProperties": {}
            }
          },
          "multiple": {
            "type": "boolean"
          },
          "config": {
            "type": "object",
            "properties": {
              "display": {
                "type": "string",
                "enum": [
                  "exact",
                  "month",
                  "quarter"
                ]
              }
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "label",
          "type"
        ],
        "additionalProperties": {}
      }
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "parentId": {
            "default": null,
            "type": [
              "string",
              "null"
            ]
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "values": {
            "default": {},
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "null"
                  ]
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": {}
      }
    },
    "views": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "table",
              "board",
              "timeline"
            ]
          },
          "filter": {
            "default": {
              "conditions": []
            },
            "type": "object",
            "properties": {
              "conditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "propertyId": {
                      "type": "string"
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "is",
                        "is_not",
                        "contains",
                        "not_contains",
                        "is_empty",
                        "is_not_empty",
                        "eq",
                        "neq",
                        "gt",
                        "lt",
                        "gte",
                        "lte",
                        "before",
                        "after",
                        "on_or_before",
                        "on_or_after",
                        "is_checked",
                        "is_unchecked"
                      ]
                    },
                    "value": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "propertyId",
                    "operator"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "conditions"
            ],
            "additionalProperties": {}
          },
          "sort": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "propertyId": {
                  "type": "string"
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "asc",
                    "desc"
                  ]
                }
              },
              "required": [
                "propertyId",
                "direction"
              ],
              "additionalProperties": {}
            }
          },
          "groupByPropertyId": {
            "type": "string"
          },
          "density": {
            "type": "string",
            "enum": [
              "compact",
              "default",
              "comfortable",
              "presentation"
            ]
          },
          "showLegend": {
            "type": "boolean"
          },
          "colorBy": {
            "default": {
              "source": "none"
            },
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "const": "none"
                  }
                },
                "required": [
                  "source"
                ],
                "additionalProperties": {}
              },
              {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "const": "custom"
                  }
                },
                "required": [
                  "source"
                ],
                "additionalProperties": {}
              },
              {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "const": "property"
                  },
                  "propertyId": {
                    "type": "string"
                  }
                },
                "required": [
                  "source",
                  "propertyId"
                ],
                "additionalProperties": {}
              }
            ]
          },
          "order": {
            "default": {},
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "table": {
            "type": "object",
            "properties": {
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "propertyId": {
                      "type": "string"
                    },
                    "width": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "propertyId",
                    "width"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "columns"
            ],
            "additionalProperties": {}
          },
          "board": {
            "type": "object",
            "properties": {
              "cardProperties": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "hiddenGroups": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "columnOrder": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "subGroupByPropertyId": {
                "type": "string"
              },
              "collapsedSubGroups": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cardColor": {
                "type": "string",
                "enum": [
                  "strip",
                  "fill",
                  "top"
                ]
              },
              "columnHeaderStyle": {
                "type": "string",
                "enum": [
                  "panel",
                  "plain"
                ]
              },
              "showCounts": {
                "type": "boolean"
              },
              "columnWidth": {
                "type": "number"
              },
              "columnColors": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string",
                  "enum": [
                    "slate",
                    "blue",
                    "teal",
                    "green",
                    "amber",
                    "orange",
                    "red",
                    "violet"
                  ]
                }
              }
            },
            "additionalProperties": {}
          },
          "timeline": {
            "type": "object",
            "properties": {
              "startPropertyId": {
                "type": "string"
              },
              "endPropertyId": {
                "type": "string"
              },
              "milestonePropertyId": {
                "type": "string"
              },
              "zoom": {
                "default": "quarter",
                "type": "string",
                "enum": [
                  "week",
                  "biweek",
                  "month",
                  "quarter",
                  "half",
                  "year"
                ]
              },
              "axisLabels": {
                "type": "string",
                "enum": [
                  "dates",
                  "weeks"
                ]
              },
              "highlightWeekends": {
                "type": "boolean"
              },
              "showGridlines": {
                "type": "boolean"
              },
              "anchor": {
                "type": "string"
              },
              "laneOrder": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "hiddenLanes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "laneColors": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string",
                  "enum": [
                    "slate",
                    "blue",
                    "teal",
                    "green",
                    "amber",
                    "orange",
                    "red",
                    "violet"
                  ]
                }
              },
              "collapsedLanes": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "showDependencies": {
                "type": "boolean"
              },
              "shift": {
                "type": "string",
                "enum": [
                  "overlap",
                  "gap",
                  "none"
                ]
              },
              "axisBand": {
                "type": "boolean"
              },
              "laneBanding": {
                "type": "boolean"
              },
              "showToday": {
                "type": "boolean"
              },
              "barHeight": {
                "type": "number"
              },
              "barLabels": {
                "type": "string",
                "enum": [
                  "inside",
                  "outside",
                  "hidden"
                ]
              },
              "barDates": {
                "type": "boolean"
              },
              "laneLabelStyle": {
                "type": "string",
                "enum": [
                  "text",
                  "chip"
                ]
              },
              "avoidWeekends": {
                "type": "boolean"
              },
              "visibleProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "startPropertyId",
              "endPropertyId"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "additionalProperties": {}
      }
    }
  },
  "required": [
    "schemaVersion",
    "properties",
    "items",
    "views"
  ],
  "additionalProperties": {}
}
