transitland-datastore icon indicating copy to clipboard operation
transitland-datastore copied to clipboard

Stricter JSON schema validation

Open irees opened this issue 8 years ago • 0 comments

Set additionalProperties: false on all JSON schemas. This is mostly implemented in #301. However, still need to add several license related attributes for Feed.

Ex. payload generated by feed-registry for testing:

{"changes":[{"action":"createUpdate","operator":{"name":"Bay Area Rapid Transit","short_name":"asd","country":"United States","state":"California","metro":"oakland","website":"http://www.bart.gov","timezone":"America/Los_Angeles","geometry":{"type":"Polygon","coordinates":[[[-122.4690807,37.557355],[-121.900367,37.557355],[-121.900367,38.018914],[-122.4690807,38.018914],[-122.4690807,37.557355]]]},"tags":{"agency_phone":null,"agency_lang":"en","agency_fare_url":null,"agency_id":"BART"},"onestopId":"o-9q9-bayarearapidtransit"}},{"action":"createUpdate","feed":{"url":"http://www.bart.gov/dev/schedules/google_transit.zip","license_name":"123","license_url":"http://google.com","license_use_without_attribution":"yes","license_create_derived_product":"no","license_redistribute":"unknown","onestopId":"f-9q9-bayarearapidtransit","includesOperators":[{"gtfsAgencyId":"BART","operatorOnestopId":"o-9q9-bayarearapidtransit"}]}}]}

irees avatar Mar 10 '16 19:03 irees