-
Notifications
You must be signed in to change notification settings - Fork 62
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
Clarify optional field representation in GeoJSON feed ouput - create a JSON Schema #73
Comments
We would definitely like to see this occur! |
Agree with the need for a JSON Schema. My only substantive concern at this point would be that a JSON Schema would need to be consistent with what the WZDx specification has tried to balance so far - allowing for the diversity of existing approaches but trying to bring some degree of harmony. If folks think that a JSON Schema is a helpful approach to feed validation that doesn't become too prescriptive, then it seems to be a very useful, even critical, tool to have. Thoughts? Also worth noting that a team at 18F developed a validator for v1.1 WZDx JSON feeds, which may be a possible place to build from: https://github.com/18F/usdot-jpo-ode-workzone-data-exchange |
@natedeshmukhtowery can you clarify what you mean by the following?
The JSON Schema would allow for as much diversity of implementation as possible given the required fields and GeoJSON required structure. I'm glad to see there was a JSON Schema for v1.1, thank you for linking to it. I feel as though we should definitely go ahead with this for v2. I'll begin putting that together for review. |
Note also we still need community consensus on how we want to represent value-less optional fields, as described in the first issue comment text. |
@j-d-b your following sentence clarifies sufficiently - as long as the JSON schema allows for as much diversity of implementation as possible given the required elements and GeoJSON structure, I'm 100% comfortable. This is the sharp edge of where my technical knowledge ends... Thanks for moving forward with a v2 Schema draft - agree that there needs to be additional discussion on the value-less optional fields - @sknick-iastate, @DeraldDudley and others - any thoughts? |
Resolved in #79 |
Clarify optional field representation in GeoJSON feed ouput - create a JSON Schema
Background
Currently, some WZDx fields are optional. The intention of an optional field is to allow pieces of information that:
to be included when relevant or if available.
However, the spec doesn't clarify how an optional piece of data that is intended to have no value should be represented in the GeoJSON feed output.
Representing a value-less optional field in the feed output
There are two (reasonable) ways to accomplish this:
beginning_milepost
) is still required to be present in the GeoJSON feed output but its value should benull
if it is inapplicable/unable to be filled out.Implementing the clarification
The chosen representation from the previous section could be clarified with an additional paragraph of text in the
create-feed
README, however, a better approach would be to describe the representation by creating a schema for the GeoJSON feed output. A JSON schema leaves nothing up to interpretation by the reader and has the additional benefit of allowing feed producers to validate their feed output. I believe this benefit makes it worth the additional time to create over just adding a block of explanatory text.The text was updated successfully, but these errors were encountered: