Skip to content

Commit

Permalink
v10: Docs, Ergonomics, Bug Fixes (#19)
Browse files Browse the repository at this point in the history
* Check in

* Update BusResponses.swift

* Document rail code

* Lots of docs

* Add Corresponding WMATADelegate Handler docs

Docs for WMATADate

* Update Errors.swift

* Add v10 Migration Guide
  • Loading branch information
emma-k-alexandra authored Feb 15, 2021
1 parent 2ff2c8e commit a794b2f
Show file tree
Hide file tree
Showing 16 changed files with 2,018 additions and 370 deletions.
36 changes: 36 additions & 0 deletions Documentation/v10 Migration Guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Migration to v10

## Breaking changes

- `Route` now encodes to a single value again rather than an object. If you have previously saved documents using v9 containing a `Route`, you'll need to re-encode them. For example, with a JSONEncoder
Prior to v9
```javascript
"route": "10A"
```

v9
```javascript
"route": {
"id": "10A"
}
```

v10
```javascript
"route"": "10A"
```
-`Stop` now encodes to a single value. If you have previously saved documents containing a `Stop`, you'll need to re-encode them. For example with JSONEncoder
Prior to v10
```javascript
"stop": {
"id": "1234567"
}
```
v10
```javascript
"stop": "1234567"
```
- `StopInfo`'s `time` field now decodes to a `Date` rather than a `String`.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ WMATA.swift is a Swift interface to the [Washington Metropolitan Area Transit Au

```swift
dependencies: [
.package(url: "https://github.com/emma-k-alexandra/WMATA.swift.git", .upToNextMajor(from: "9.0.0"))
.package(url: "https://github.com/emma-k-alexandra/WMATA.swift.git", .upToNextMajor(from: "10.0.0"))
]
```

## Migration Guides

- [v9 Migration Guide][v9-migration-guide]
- [v10 Migration Guide][v10-migration-guide]

## Dependencies

Expand Down Expand Up @@ -82,6 +83,7 @@ WMATA.swift is released under the MIT license. [See LICENSE](https://github.com/
[radius-at-coordinates]: https://github.com/emma-k-alexandra/WMATA.swift/blob/master/Documentation/Miscellaneous.md#RadiusAtCoordinates
[wmata-date]: https://github.com/emma-k-alexandra/WMATA.swift/blob/master/Documentation/Miscellaneous.md#WMATADate
[v9-migration-guide]: https://github.com/emma-k-alexandra/WMATA.swift/blob/master/Documentation/v9%20Migration%20Guide.md
[v10-migration-guide]: https://github.com/emma-k-alexandra/WMATA.swift/blob/master/Documentation/v10%20Migration%20Guide.md
[gtfs]: https://github.com/emma-k-alexandra/GTFS
[swift-protobuf]: https://github.com/apple/swift-protobuf
[wmata]: https://developer.wmata.com
Expand Down
Loading

0 comments on commit a794b2f

Please sign in to comment.