Skip to main content
Documentation for the Restaurant category category.

Schema Structure

This category uses the standard QR code category structure.

Components Used

This category uses the following components:

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "array",
  "title": "Restaurant category",
  "examples": [],
  "additionalProperties": false,
  "items": {
    "type": "object",
    "required": [
      "type",
      "data"
    ],
    "additionalProperties": false,
    "properties": {
      "type": {
        "type": "string",
        "enum": [
          "page_layout",
          "design_info",
          "brand_info",
          "menu_info",
          "feedback_info",
          "about_us",
          "review_us",
          "social_media_profiles",
          "footer_info",
          "page_settings"
        ]
      },
      "data": {
        "type": "object"
      }
    },
    "allOf": [
      {
        "if": {
          "properties": {
            "type": {
              "const": "page_layout"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "properties": {
                "templateName": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "design_info"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "$ref": "components/design_info.json"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "brand_info"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "$ref": "components/brand_info.json"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "menu_info"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "oneOf": [
                {
                  "properties": {
                    "single": {
                      "type": "object",
                      "properties": {
                        "file": {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
                            }
                          }
                        }
                      },
                      "required": [
                        "file"
                      ]
                    },
                    "additionalProperties": false
                  },
                  "required": [
                    "single"
                  ]
                },
                {
                  "properties": {
                    "multiple": {
                      "type": "array",
                      "required": [
                        "title",
                        "file"
                      ],
                      "items": {
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "icon": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
                              }
                            }
                          },
                          "id": {
                            "type": "integer"
                          },
                          "file": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
                              }
                            }
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "required": [
                    "multiple"
                  ]
                }
              ]
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "feedback_info"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "comment_box": {
                  "type": "boolean"
                },
                "heading": {
                  "type": "string",
                  "maxLength": 100
                },
                "input": {
                  "type": "array",
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "type": {
                        "type": "string",
                        "maxLength": 10
                      },
                      "required": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "parameters": {
                  "type": "array",
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 30
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "about_us"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "images": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "review_us"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "platforms": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "icon": {
                        "type": "string"
                      },
                      "data": {
                        "type": "string",
                        "maxLength": 100,
                        "pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
                      },
                      "key": {
                        "type": "string"
                      },
                      "tracking": {
                        "type": "object",
                        "required": [
                          "id",
                          "tag"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "social_media_profiles"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "profiles"
              ],
              "additionalProperties": false,
              "properties": {
                "profiles": {
                  "$ref": "components/social_profile.json"
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "footer_info"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "text"
              ],
              "additionalProperties": false,
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "page_settings"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "$ref": "components/page_settings.json"
            }
          }
        }
      }
    ]
  }
}