{
  "id": "#urval-fr-samfallighetsforening-1.0.2.json",
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "Urval Samfällighetsförening",
  "description": "Schema för Urval Samfällighetsförening",
  "oneOf": [
    {
      "$ref": "#/definitions/request"
    },
    {
      "$ref": "#/definitions/response"
    }
  ],
  "definitions": {
    "request": {
      "oneOf": [
        {
          "$ref": "#/definitions/tidsstampelrequest"
        }
      ]
    },
    "response": {
      "oneOf": [
        {
          "$ref": "#/definitions/forandringidresponse"
        },
        {
          "$ref": "#/definitions/errorresponse"
        }
      ]
    },
    "tidsstampelrequest": {
      "type": "object",
      "description": "Tidsstämpel",
      "properties": {
        "to": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "forandringidresponse": {
      "allOf": [
        {
          "type": "object",
          "description": "Tidsstämpel"
        },
        {
          "type": "object",
          "description": "Lista med ID-referenser",
          "items": {
            "$ref": "#/definitions/uuid"
          }
        }
      ]
    },
    "errorresponse": {
      "title": "Error Message",
      "type": "object",
      "properties": {
        "status": {
          "type": "integer"
        },
        "message": {
          "type": "string"
        },
        "timestamp": {
          "type": "string"
        },
        "path": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "message",
        "timestamp",
        "path"
      ]
    },
    "uuid": {
      "type": "string",
      "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
    }
  }
}
