Skip to content

Commit d34a93f

Browse files
authored
Add missing rule_id to rule in Policy spec (#409)
* Add missing rule_id to rule in Policy spec * Add missing rule_ids in policy>example
1 parent d4b5669 commit d34a93f

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

policy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ An individual `Rule` object is defined by the following fields:
205205
| Name | Type | Required / Optional | Description |
206206
| --------------- | --------------------------- | ------------------- | ----------------------------------------- |
207207
| `name` | String | Required | Name of rule |
208+
| `rule_id` | UUID | Required | Unique ID of the rule |
208209
| `rule_type` | enum | Required | Type of policy (see [Rule Types](#rule-types)) |
209210
| `geographies` | UUID[] | Required | List of Geography UUIDs (non-overlapping) specifying the covered geography |
210211
| `statuses` | `{ status: vehicle event[] }` | Required | Vehicle `statuses` to which this rule applies, either from [Provider](../provider/README.md#event-types) or [Agency](../agency/README.md#vehicle-events). Optionally provide a list of specific `event_type`'s as a subset of a given status for the rule to apply to. An empty list or `null`/absent defaults to "all". |

policy/examples.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ This Policy allows scooters and bikes can be in the public right-of-way for up t
123123
"prev_policies": null,
124124
"rules": [{
125125
"name": "Greater LA (rentable)",
126+
"rule_id": "e1942f2d-e5c7-46c4-94c7-293d4e481ed0",
126127
"rule_type": "time",
127128
"rule_units": "hours",
128129
"geographies": [
@@ -139,6 +140,7 @@ This Policy allows scooters and bikes can be in the public right-of-way for up t
139140
"maximum": 72
140141
}, {
141142
"name": "Greater LA (non-rentable)",
143+
"rule_id": "a7eb28b9-969e-4c52-b18c-4243a96f7143",
142144
"rule_type": "time",
143145
"rule_units": "hours",
144146
"geographies": [
@@ -174,6 +176,7 @@ This Policy sets a 15 MPH speed limit in greater LA, and a 10 MPH speed limit in
174176
"prev_policies": null,
175177
"rules": [{
176178
"name": "Greater LA",
179+
"rule_id": "529b6cd7-0e0d-4439-babf-c5908a664ecf",
177180
"rule_type": "speed",
178181
"rule_units": "mph",
179182
"geographies": [
@@ -189,6 +192,7 @@ This Policy sets a 15 MPH speed limit in greater LA, and a 10 MPH speed limit in
189192
"maximum": 15
190193
}, {
191194
"name": "Venice Beach on weekend afternoons",
195+
"rule_id": "d4c0f42f-3f79-4eb4-850a-430b9701d5cf",
192196
"rule_type": "speed",
193197
"rule_units": "mph",
194198
"geographies": [

0 commit comments

Comments
 (0)