Skip to content

Commit a17acb9

Browse files
author
billdirks
authored
Merge pull request #4 from CityOfLosAngeles/master
Merging City of LA MDS dev branch into Ride Reports dev branch
2 parents 998999a + 15d6e9f commit a17acb9

8 files changed

Lines changed: 116 additions & 27 deletions

File tree

.github/ISSUE_TEMPLATE/feature-request---proposal.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,34 @@ assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
10+
### Is your feature request related to a problem? Please describe.
11+
1112
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1213

13-
**Describe the solution you'd like**
14+
### Describe the solution you'd like
15+
1416
A clear and concise description of what you want to happen.
1517

16-
**Is this a breaking change**
18+
### Is this a breaking change
19+
1720
A breaking change would require consumers or implementors of the API to modify their code for it to continue to function (ex: renaming of a required field or the change in data type of an existing field). A non-breaking change would allow existing code to continue to function (ex: addition of an optional field or the creation of a new optional endpoint).
1821

19-
[ ] Yes, breaking
20-
[ ] No, not breaking
21-
[ ] I'm not sure
22+
* [ ] Yes, breaking
23+
* [ ] No, not breaking
24+
* [ ] I'm not sure
25+
26+
### `Provider` or `agency`
2227

23-
**`Provider` or `agency`**
2428
For which API is this feature being requested:
25-
[ ] `provider`
26-
[ ] `agency`
27-
[ ] both
2829

29-
**Describe alternatives you've considered**
30+
* [ ] `provider`
31+
* [ ] `agency`
32+
* [ ] both
33+
34+
### Describe alternatives you've considered
35+
3036
A clear and concise description of any alternative solutions or features you've considered.
3137

32-
**Additional context**
38+
### Additional context
39+
3340
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
**Explain pull request**
1+
### Explain pull request
2+
23
Please provide a clear and concise reason for this pull request and the impact of the change
34

4-
**Is this a breaking change**
5+
### Is this a breaking change
6+
57
A breaking change would require consumers or implementors of the API to modify their code for it to continue to function (ex: renaming of a required field or the change in data type of an existing field). A non-breaking change would allow existing code to continue to function (ex: addition of an optional field or the creation of a new optional endpoint).
68

7-
[ ] Yes, breaking
8-
[ ] No, not breaking
9-
[ ] I'm not sure
9+
* [ ] Yes, breaking
10+
* [ ] No, not breaking
11+
* [ ] I'm not sure
12+
13+
### `Provider` or `agency`
1014

11-
**`Provider` or `agency`**
1215
Which API(s) will this pull request impact:
13-
[ ] `provider`
14-
[ ] `agency`
15-
[ ] both
1616

17-
**Additional context**
17+
* [ ] `provider`
18+
* [ ] `agency`
19+
* [ ] both
20+
21+
### Additional context
22+
1823
Add any other context or screenshots about the feature request here.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ The specification is a way to implement realtime data sharing, measurement and r
1414

1515
Cities and regulators can choose best how to implement *Agency* and *Provider* either separately, concurrently, or by endpoint.
1616

17+
## Versions
18+
1719
The specification will be versioned using Git tags and [semantic versioning](https://semver.org/). See prior [releases](https://github.com/CityOfLosAngeles/mobility-data-specification/releases) and the [Release Guidelines](ReleaseGuidelines.md) for more information.
1820

21+
Please note, you may be viewing a development copy of the Mobility Data Specification based on the current branch. Info about the latest release and all releases is below.
22+
23+
* [Latest Release](https://github.com/CityOfLosAngeles/mobility-data-specification/tree/master)
24+
25+
* [All Releases](https://github.com/CityOfLosAngeles/mobility-data-specification/releases)
26+
1927
## Announcements
2028

2129
The City of Los Angeles is currently looking for feedback and comments on the draft versions. Comments can be made by making an Github Issue, while suggested changes can be made using a pull request. The rules and guidelines for the Los Angeles Dockless Bikeshare Systems / Pilot Program can be found on [Council Clerk Connect](https://cityclerk.lacity.org/lacityclerkconnect/index.cfm?fa=ccfi.viewrecord&cfnumber=17-1125).

ReleaseGuidelines.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ MDS uses [Semantic Versioning][semver]. Each release is associated with a [`git
1919

2020
Given that MDS is stabilizing under MAJOR version `0.x` right now, it should be assumed that MINOR version increments (e.g. `0.2.0` to `0.3.0`) are equivalent to MAJOR version increments and may contain breaking changes.
2121

22+
### Breaking vs. non-breaking changes
23+
24+
Since MDS is used by a broad ecosystem of both API consumers and implementers, it needs a strict definition of what changes are “non-breaking” and are therefore allowed in PATCH releases.
25+
26+
In the MDS spec, a breaking change is any change that requires either consumers or implementers to modify their code for it to continue to function correctly.
27+
28+
Examples of breaking changes include:
29+
30+
* Adding or removing a required endpoint or field
31+
* Adding or removing a request parameter
32+
* Changing the data type or semantics of an existing field, including clarifying previously-ambiguous requirements
33+
34+
Examples of non-breaking changes include:
35+
36+
* Adding or removing an optional endpoint or field
37+
* Adding or removing enum values
38+
* Modifying documentation or spec language that doesn't affect the behavior of the API directly
39+
40+
One implication of this policy is that clients should be prepared to ignore the presence of unexpected fields in responses and unexpected values for enums. This is necessary to preserve compatibility between PATCH versions within the same MINOR version range, since optional fields and enum values can be added as non-breaking changes.
41+
2242
### Ongoing version support
2343

2444
At this early stage, MDS will be moving relatively quickly with an eye toward stabilization rather than backwards-compatibility.

ReleaseNotes.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
## 0.3.1
2+
3+
> Released 2019-04-30
4+
5+
This release represents a series of non-breaking changes and clarifications for provider, along with a number of agency bugfixes / changes.
6+
7+
**CHANGES**
8+
9+
*_Provider_*
10+
* MDS Schema version fix.
11+
* [New release process](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/264). Thanks @jfh for documenting, all for participating
12+
* [Additional documentation around what is considered Breaking / Non-Breaking](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/295). Thanks @rf-
13+
* [OPTIONS for version negotiation](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/293). Thanks @billdirks
14+
* [Add Agency Drop off / pick up](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/291). Thanks @margodawes
15+
* [Explicitly allow associated_trip for any event type](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/297)
16+
17+
*_Agency_*
18+
* Change from UUIDv4 to just UUID. Thanks @karcass
19+
* Change Error Messages for State Machine validation.
20+
* Update Pagination Rules
21+
* Add Unregistered event.
22+
* [Add Event Diagram](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/258). Thanks @whereissean
23+
* [Removing 412 Responses](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/258)
24+
* Add deregister and decomissioned events. Thanks @dirkdk
25+
* [Remove 5 second Telemetry requirement](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/261)
26+
* [Improve failure and error handling around Telemetry Data](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/290)
27+
128
## 0.3.0
229

330
> Released 2019-02-15

generate_schema/provider/status_changes.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@
123123
"service_start",
124124
"user_drop_off",
125125
"rebalance_drop_off",
126-
"maintenance_drop_off"
126+
"maintenance_drop_off",
127+
"agency_drop_off"
127128
]
128129
}
129130
}
@@ -157,7 +158,8 @@
157158
"enum": [
158159
"service_end",
159160
"rebalance_pick_up",
160-
"maintenance_pick_up"
161+
"maintenance_pick_up",
162+
"agency_pick_up"
161163
]
162164
}
163165
}

provider/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ Content-Type: application/vnd.mds.provider+json;version=0.3
4141
4242
If an unsupported or invalid version is requested, the API must respond with a status of `406 Not Acceptable`. In which case, the response should include a body specifying a list of supported versions.
4343

44+
A client can explicitly negotiate headers using the `OPTIONS` method to an MDS endpoint. For example, to check if `trips` supports either version `0.2` or `0.3` with a preference for `0.2`, the client would issue the following request:
45+
46+
```http
47+
OPTIONS /trips/ HTTP/1.1
48+
Host: provider.example.com
49+
Accept: application/vnd.mds.provider+json;version=0.2,application/vnd.mds.provider+json;version=0.3;q=0.9
50+
```
51+
52+
The response will include the most preferred supported version in the `Content-Type` header. For example, if only `0.3` is supported:
53+
54+
```http
55+
Content-Type: application/vnd.mds.provider+json;version=0.3
56+
```
57+
58+
The client can use the returned value verbatim as a version request in the `Accept` header.
59+
4460
### Response Format
4561

4662
The response to a client request must include a valid HTTP status code defined in the [IANA HTTP Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml). It also must set the `Content-Type` header, as specified in the [Versioning](#Versioning) section.
@@ -276,7 +292,7 @@ Schema: [`status_changes` schema][sc-schema]
276292
| `event_time` | [timestamp][ts] | Required | Date/time that event occurred, based on device clock |
277293
| `event_location` | GeoJSON [Point Feature][geo] | Required | |
278294
| `battery_pct` | Float | Required if Applicable | Percent battery charge of device, expressed between 0 and 1 |
279-
| `associated_trip` | UUID | Required if Applicable | Trip UUID (foreign key to Trips API) required if `event_type_reason` is `user_pick_up` or `user_drop_off` |
295+
| `associated_trip` | UUID | Required if Applicable | Trip UUID (foreign key to Trips API), required if `event_type_reason` is `user_pick_up` or `user_drop_off`, or for any other status change event that marks the end of a trip. |
280296

281297
### Status Changes Query Parameters
282298

@@ -295,12 +311,14 @@ When multiple query parameters are specified, they should all apply to the retur
295311
| | | `user_drop_off` | User ends reservation |
296312
| | | `rebalance_drop_off` | Device moved for rebalancing |
297313
| | | `maintenance_drop_off` | Device introduced into service after being removed for maintenance |
314+
| | | `agency_drop_off` | The administrative agency (ie, DOT) drops a device into the PROW using an admin code or similar |
298315
| `reserved` | A customer reserves a device (even if trip has not started yet) | `user_pick_up` | Customer reserves device |
299316
| `unavailable` | A device is on the street but becomes unavailable for customer use | `maintenance` | A device is no longer available due to equipment issues |
300317
| | | `low_battery` | A device is no longer available due to insufficient battery |
301318
| `removed` | A device is removed from the street and unavailable for customer use | `service_end` | Device removed from street because service has ended for the day (if program does not operate 24/7) |
302319
| | | `rebalance_pick_up` | Device removed from street and will be placed at another location to rebalance service |
303320
| | | `maintenance_pick_up` | Device removed from street so it can be worked on |
321+
| | | `agency_pick_up` | The administrative agency (ie, DOT) removes a device using an admin code or similar |
304322

305323
[Top][toc]
306324

provider/status_changes.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@
314314
"service_start",
315315
"user_drop_off",
316316
"rebalance_drop_off",
317-
"maintenance_drop_off"
317+
"maintenance_drop_off",
318+
"agency_drop_off"
318319
]
319320
}
320321
}
@@ -359,7 +360,8 @@
359360
"enum": [
360361
"service_end",
361362
"rebalance_pick_up",
362-
"maintenance_pick_up"
363+
"maintenance_pick_up",
364+
"agency_pick_up"
363365
]
364366
}
365367
}

0 commit comments

Comments
 (0)