Adds a "missing" status to the "agency" specification. #429
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explain pull request
This PR creates a
missing
status as part of the agency specification. It is often the case that scooters go missing for a short period of time due to GPS issues, connectivity issues, etc. Under the current spec, this is supposed to be handled by deregistering the scooter and setting its state toremoved
, but this makes it difficult to distinguish scooters which have been removed by our operations people and scooters which have simply gone missing, which causes confusion when someone comes across a scooter in the wild which shows up asremoved
. What's more, deregistering and re-registering a scooter is more work to implement than changing the state to and frommissing
would be.Is this a breaking change
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).
As written, this removes the
missing
transition toremoved
, which would break existing implementations that use this transition.Impacted Spec
Which spec(s) will this pull request impact?
agency
Additional context
This follows up discussion in #67 and #376 (comment) . Mark said he would work on such a PR, but since I had already started on this one I figured I could post it. I was holding off until I had figured out
provider
changes, but I think he was right and that can be put in a separate PR.