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

Fix CQL2 JSON Schema and some examples #902

Merged
merged 4 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
804 changes: 242 additions & 562 deletions cql2/standard/schema/cql2.json

Large diffs are not rendered by default.

238 changes: 169 additions & 69 deletions cql2/standard/schema/cql2.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cql2/standard/schema/examples/json/clause6_01.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "function": { "name": "avg", "args": [ { "property": "windSpeed" } ] } }
{ "op": "avg", "args": [ { "property": "windSpeed" } ] }
6 changes: 2 additions & 4 deletions cql2/standard/schema/examples/json/clause6_02b.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
"op": "<",
"args": [
{
"function": {
"name": "avg",
"args": [ { "property": "windSpeed" } ]
}
"op": "avg",
"args": [ { "property": "windSpeed" } ]
},
4
]
Expand Down
14 changes: 6 additions & 8 deletions cql2/standard/schema/examples/json/clause7_18.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
"args": [
{ "property": "road" },
{
"function": {
"name": "Buffer",
"args": [
{ "property": "geometry" },
10,
"m"
]
}
"op": "Buffer",
"args": [
{ "property": "geometry" },
10,
"m"
]
}
]
}
6 changes: 2 additions & 4 deletions cql2/standard/schema/examples/json/example68.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
"op": "=",
"args": [
{
"function": {
"name": "Foo",
"args": [ { "property": "geometry" } ]
}
"op": "Foo",
"args": [ { "property": "geometry" } ]
},
true
]
Expand Down
6 changes: 2 additions & 4 deletions cql2/standard/schema/examples/json/example69.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
"args": [
false,
{
"function": {
"name": "Bar",
"args": [ { "property": "geometry" }, 100, "a", "b", false ]
}
"op": "Bar",
"args": [ { "property": "geometry" }, 100, "a", "b", false ]
}
]
}
9 changes: 9 additions & 0 deletions cql2/standard/schema/examples/json/validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# validation using https://www.npmjs.com/package/ajv-cli

# validate all examples
for f in *.json
do
ajv validate -s "../../cql2.json" --spec=draft2020 --validateFormats=false --strict=true --errors=no -d $f
done