-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconciled JSON schemas #534
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was
linked to
issues
Jun 26, 2020
Closed
This was referenced Jun 26, 2020
4321711
to
1b9288d
Compare
This is a refactor of the Provider schema templates and generation process to make more reuse of common types and structures: * The repeated structure from outside wrapper has been refactored into templates/provider/endpoint.json * Common vehicle information (provider_id, vehicle_type, etc.) has been refactored into a defintion in templates/common.json, which is added to the list of definitions for each endpoint * Each endpoint specific template has been refactored to contain only those properties and definitions specific to the endpoint; common properties and definitions are merged at generation time * The generation script was improved for readability and runtime feedback * The generation script accepts arguments for selectively generating Agency and/or Provider schemas (default is still to generate both)
* reuse common string definition in Agency templates * renaming vehicle fields in Agency to make common schema reuse easier * renaming status_changes.associated_trip --> status_changes.trip_id and reusing validation rule in Agency and Provider schemas * pluralizing propulsion_types (array field) in both * further reorganize schema generation for alignment between Agency and Provider
* use new field names and plurality * common state and event defintions merged by schema generator * valid state/event combinations merged by schema generator
Existing endpoints are being augmented with Docked information and new endpoints will co-exist.
Ensure that the vehicle_events array contains at least one of the valid transition events for the given vehicle_state
5fbf59a
to
22db940
Compare
See my comment on the Issue for a trade-off I had to make in validating the vehicle state machine. |
schnuerle
approved these changes
Jun 29, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big job, thanks for taking it on @thekaveman! We appreciate the expertise.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Following up with #506, this is an update to the JSON Schema generation process and schemas for the reconciled state machine.
Work is ongoing and almost there. Marking as DRAFT for now.
Fixes #518
Fixes #526
Fixes #531