-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathstation.schema.yaml
52 lines (44 loc) · 1.33 KB
/
station.schema.yaml
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
# Compose in the "station" definition from ride.schema.yaml,
# which defines "id", "name", and "geo".
$ref: ride.schema.yaml#/$defs/station
properties:
arrival:
description: "Statistics on Bike arrivals to the station"
properties:
ride:
title: "Bikes ridden to the station"
type: integer
reduce: { strategy: sum }
move:
title: "Bikes moved to the station"
type: integer
reduce: { strategy: sum }
type: object
reduce: { strategy: merge }
departure:
description: "Statistics on Bike departures from the station"
properties:
ride:
title: "Bikes ridden from the station"
type: integer
reduce: { strategy: sum }
move:
title: "Bikes moved from the station"
type: integer
reduce: { strategy: sum }
type: object
reduce: { strategy: merge }
stable:
description: "Set of Bike IDs which are currently at this station"
type: object
reduce:
strategy: set
# Use bike IDs as their own keys.
key: [""]
# Sets are composed of 'add', 'intersect', and 'remove' components.
# Here, we're representing the set as an array of integer bike IDs.
additionalProperties:
type: array
items: { type: integer }
reduce: { strategy: merge }
reduce: { strategy: merge }