Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Frontend Typ Bar

uniqueinput edited this page Dec 21, 2014 · 9 revisions

Schema

{
  "title": "Bar",
  "description": "JSON Repräsentation einer Bar",
  "type": "object",
  "properties": {
    "id": { 
      "type": "string",
      "required": true
    },
    "name": { 
      "type": "string",
      "required": true
    },
    "rating": { 
      "type": "number",
      "required": true
    },
    "costs": { 
      "type": "number",
      "required": true
    },
    "description": { 
      "type": "string",
      "required": true
    },
    "imageUrl": { 
      "type": "string",
      "required": true
    },
    "location": { 
      "type": "Location",
      "required": true
    },
    "address": { 
      "type": "string",
      "required": true
    },
    "openingTimes": {
      "type": "array",
      "required": true,
      "items": {
        "type": "object",
        "properties": {
          "startTime": {
            "type": "string",
            "required": true
          },
          "endTime": {
            "type": "string",
            "required": true
          },
          "days": {
            "type": "array",
            "required": true,
            "items": {
              "type": "number",
              "minItems": 1
            }
          }
        }
      }
    },
    "happyHours": {
      "type": "array",
      "required": true,
      "items": {
        "type": "HappyHour",
      }
    }
  }
}

Verwendet

Beispiel

{
  "id": "d362985702875md5",
  "name": "Beste Bar",
  "rating": 4,
  "costs": 3,
  "description": "Die beste Bar in Stuttgart",
  "imageUrl": "http://www.pic.image.png",
  "openingTimes": [
    {
      "startTime": "08:00", 
      "endTime": "10:00", 
      "days": [1,2,3,4,5]
    }, 
    {
      "startTime": "08:00", 
      "endTime": "12:00", 
      "days": [6,7]
    }
  ],
  "location": (Location),
  "address": "Coole Straße 49 Stuttgart",
  "happyHours": [
    (HappyHour),
    (HappyHour)
  ]
}

Clone this wiki locally