summaryrefslogtreecommitdiff
path: root/cli/schemas/kv-metadata-exchange-response.v1.json
blob: aa29242fbfbc81133bdc16ea60d6fdc4fe76769d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
  "$id": "https://deno.land/x/deno/cli/schemas/kv-metadata-exchange-response.v1.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "Uuid": {
      "type": "string",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    },
    "DateTime": {
      "type": "string",
      "format": "date-time"
    },
    "EndpointInfo": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "consistency": {
          "type": "string"
        }
      },
      "required": ["url", "consistency"],
      "additionalProperties": false
    },
    "DatabaseMetadata": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "minimum": 0
        },
        "databaseId": {
          "$ref": "#/definitions/Uuid"
        },
        "endpoints": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EndpointInfo"
          }
        },
        "token": {
          "type": "string"
        },
        "expiresAt": {
          "$ref": "#/definitions/DateTime"
        }
      },
      "required": ["version", "databaseId", "endpoints", "token", "expiresAt"],
      "additionalProperties": false
    }
  },
  "$ref": "#/definitions/DatabaseMetadata"
}