-
Notifications
You must be signed in to change notification settings - Fork 0
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
Start a schema based on ATF4 guidance #34
Conversation
"properties": { | ||
"intervention": { | ||
"type": "object", | ||
"oneOf": [ |
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.
https://json-schema.org/learn/file-system.html for reference
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.
Big 👍 on this.
|
||
<script> | ||
async function setup() { | ||
let resp = await fetch("./all.json"); |
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.
I cleaned up the HTML editor to do this instead of writing the schema in this file
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.
Sounds great. Many thanks.
<head> | ||
<meta charset="utf-8" /> | ||
<title>ATF4 Schema option</title> | ||
<!-- You can't open this file locally in a browser due to CORS; use something like 'python3 -m http.server' --> |
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.
Note this. It's true for the other stuff already checked in
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.
Or 'Live Server' with VS code...
Will check locally now... |
Seems to only be scheme level options and complexity + n. junctions, right? |
In any case, good iteration and something we can build on. |
No, the schema describes one single intervention. Each is one of 4 cases, with different details based on the table in the guidance doc. Most of those details are just a complexity field. |
<head> | ||
<meta charset="utf-8" /> | ||
<title>ATF4 Schema option</title> | ||
<!-- You can't open this file locally in a browser due to CORS; use something like 'python3 -m http.server' --> |
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.
Or 'Live Server' with VS code...
"segregatedCyclingFacility": { | ||
"properties": { | ||
"complexity": { | ||
"enum": ["high", "medium", "low"] |
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.
Personally I think that complexity should not be a question to authorities: the level of complexity can be derived. It's too subjective to ask people developing schemes IMO.
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.
I agree, that's what I put in the PR description:
Also, I only added a few categories from the page. The details in each one are not terribly interesting... instead of making people pick complexity, we should ask more specific questions and auto-calculate complexity from it
But the definition of complexity in the doc is hard to translate into more concrete questions to ask. Should we ask people to state the number of junctions themselves, or should we calculate this for them?
Notice this JSON schema doesn't mention area/route/crossing/other. I'm trying to follow exactly the doc's system in this option. |
That's reasonable. Good to be faithful to what's in the guidance for reference. |
#31
Note the schema isn't written correctly yet; the editor shows an error
Value must validate against exactly one of the provided schemas. It currently validates against 4 of the schemas.
. I think it's because thecomplexity
field is used in all of the enum cases, so the schema can't understand which case we're in. Not worried about figuring out the right way to encode this yet; this is all just illustrative anyway.Also, I only added a few categories from the page. The details in each one are not terribly interesting... instead of making people pick complexity, we should ask more specific questions and auto-calculate complexity from it