Skip to content
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

Schema cleanup Redux #328

Merged
merged 4 commits into from
Jun 8, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/feature-request---proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ A clear and concise description of what you want to happen.

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).

* [ ] Yes, breaking
* [ ] No, not breaking
* [ ] I'm not sure
[ ] Yes, breaking
[ ] No, not breaking
[ ] I'm not sure

hunterowens marked this conversation as resolved.
Show resolved Hide resolved
### `Provider` or `agency`

For which API is this feature being requested:

* [ ] `provider`
* [ ] `agency`
* [ ] both
[ ] `provider`
[ ] `agency`
[ ] both

hunterowens marked this conversation as resolved.
Show resolved Hide resolved
### Describe alternatives you've considered

Expand Down
12 changes: 6 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ Please provide a clear and concise reason for this pull request and the impact o

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).

* [ ] Yes, breaking
* [ ] No, not breaking
* [ ] I'm not sure
[ ] Yes, breaking
[ ] No, not breaking
[ ] I'm not sure

hunterowens marked this conversation as resolved.
Show resolved Hide resolved
### `Provider` or `agency`

Which API(s) will this pull request impact:

* [ ] `provider`
* [ ] `agency`
* [ ] both
[ ] `provider`
[ ] `agency`
[ ] both

hunterowens marked this conversation as resolved.
Show resolved Hide resolved
### Additional context

Expand Down
13 changes: 0 additions & 13 deletions generate_schema/Pipfile

This file was deleted.

5 changes: 5 additions & 0 deletions schema/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# MDS Schema Definition

The following directory contains the code to generate the offical JSON schemas for the Mobility Data Specification. However, the official schemas live inside the `provider`, `agency` or appropriate folder.

To generate the schemas, run `python generate_schema.py` from inside this directory. To edit the JSON schemas that are generated, edit the approrpriate file inside the the `templates` directory then run the appropriate command.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_json_file(path):

if __name__ == '__main__':
# Load common data
common = get_json_file('common.json')
common = get_json_file('./templates/common.json')
point = get_point_schema()
multipolygon = get_multipolygon_schema()
# Craft the MDS specific types
Expand All @@ -136,7 +136,7 @@ def get_json_file(path):
#########

# Create the standalone trips JSON schema by including the needed definitions
trips = get_json_file('provider/trips.json')
trips = get_json_file('./templates/provider/trips.json')
trips["definitions"] = {
POINT: point,
MDS_FEATURE_POINT: mds_feature_point,
Expand All @@ -161,7 +161,7 @@ def get_json_file(path):
##################

# Create the standalone status_changes JSON schema by including the needed definitions
status_changes = get_json_file('provider/status_changes.json')
status_changes = get_json_file('./templates/provider/status_changes.json')
status_changes["definitions"] = {
POINT: point,
MDS_FEATURE_POINT: mds_feature_point,
Expand All @@ -184,7 +184,7 @@ def get_json_file(path):
###############

# Create the standalone GET vehicle JSON schema by including the needed definitions
get_vehicle = get_json_file('agency/get_vehicle.json')
get_vehicle = get_json_file('./templates/agency/get_vehicle.json')
get_vehicle["definitions"] = {
"propulsion_type": common["definitions"]["propulsion_type"],
"vehicle_type": common["definitions"]["vehicle_type"],
Expand All @@ -204,7 +204,7 @@ def get_json_file(path):
################

# Create the standalone POST vehicle JSON schema by including the needed definitions
post_vehicle = get_json_file('agency/post_vehicle.json')
post_vehicle = get_json_file('./templates/agency/post_vehicle.json')
post_vehicle["definitions"] = {
"propulsion_type": common["definitions"]["propulsion_type"],
"vehicle_type": common["definitions"]["vehicle_type"],
Expand All @@ -221,7 +221,7 @@ def get_json_file(path):
######################

# Create the standalone POST vehicle event JSON schema by including the needed definitions
post_vehicle_event = get_json_file('agency/post_vehicle_event.json')
post_vehicle_event = get_json_file('./templates/agency/post_vehicle_event.json')
post_vehicle_event["definitions"] = {
"vehicle_event": common["definitions"]["vehicle_event"],
"telemetry": common["definitions"]["telemetry"],
Expand All @@ -238,7 +238,7 @@ def get_json_file(path):
##########################

# Create the standalone POST vehicle telemetry JSON schema by including the needed definitions
post_vehicle_telemetry = get_json_file('agency/post_vehicle_telemetry.json')
post_vehicle_telemetry = get_json_file('./templates/agency/post_vehicle_telemetry.json')
post_vehicle_telemetry["definitions"] = {
"telemetry": common["definitions"]["telemetry"],
}
Expand All @@ -253,7 +253,7 @@ def get_json_file(path):
####################

# Create the standalone GET service area JSON schema by including the needed definitions
get_service_area = get_json_file('agency/get_service_area.json')
get_service_area = get_json_file('./templates/agency/get_service_area.json')
get_service_area["definitions"] = {
MULTIPOLYGON: multipolygon,
"area_type": common["definitions"]["area_type"],
Expand Down
File renamed without changes.
File renamed without changes.