EssDeeDee / safe-eats-etl

0 stars 0 forks source link

JSON Schema for food inspection scores #4

Open astrocaribe opened 6 years ago

astrocaribe commented 6 years ago

Proposed JSON schema for object returned to the ui

astrocaribe commented 6 years ago
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "title": "Food Inspection JSON Set",
  "description": "JSON Object set describing food scores for area restaurants",
  "type": "array",
  "items": {
    "title": "Food Inspection JSON Object",
    "type": "object",
    "properties": {
      "name": {
        "description": "Name of restaurant",
        "type": "string"
      },
      "address": {
        "description": "Address of restaurant",
        "type": "string"
      },
      "inspection_date": {
        "description": "Date of inspection",
        "type": "date_time"
      },
      "score" : {
        "description": "Inspection score, from 0 - 100",
        "type": "number",
        "minimum": 0,
        "maximun": 100
      },
      "violations": {
        "description": "List of violations, if any",
        "type": "array",
          "items": {
            "type": "string"
          }
      }
    }
  }
}
astrocaribe commented 6 years ago

Above created based on the JSON schema guide: http://json-schema.org/specification.html

mattgawarecki commented 6 years ago

That'll work for now, I think! Although, you misspelled 'description' near the top 😉

astrocaribe commented 6 years ago

Of course I did! Corrected!