Skip to content

Commit

Permalink
Remove mixed schema types for roads.flags property
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Bajaj committed Mar 1, 2024
1 parent 5aadbff commit c6ebccd
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"id": "invalid-road-flag-string-value",
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [[2, 2], [3, 3]]
},
"properties": {
"ext_expected_errors": [
"[I#/properties/road/flags/0] [S#/$defs/propertyDefinitions/road/properties/flags/items/type] expected object, but got string"
],
"theme": "transportation",
"type": "segment",
"version": 19,
"update_time": "2023-02-23T00:04:00-08:00",
"subtype": "road",
"road": {
"flags": ["is_tunnel"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel]
flags:
- [is_link, is_tunnel]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
speed_limits:
- max_speed: [110, "mph"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
access:
- allowed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
turns:
- segment_id: overture:transportation:segment:345
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
turns:
- toDirection: forward
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
turns:
- segment_id: overture:transportation:segment:345
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
road:
class: secondary
surface: gravel
flags: [is_link, is_tunnel, isPrivate]
flags:
- [is_link, is_tunnel, isPrivate]
restrictions:
turns:
- segment_id: overture:transportation:segment:234
Expand Down
3 changes: 2 additions & 1 deletion examples/transportation/segment/road/road.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ properties:
# no access nor lanes information -> means by default road is accessible in both directions with at least one lane in each direction
class: secondary
surface: gravel
flags: [is_link, is_tunnel]
flags:
- values: [is_link, is_tunnel]
width:
- value: 10
restrictions:
Expand Down
20 changes: 9 additions & 11 deletions schema/transportation/segment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,15 @@ properties:
as an array of flag rules.
type: array
items:
oneOf:
- { "$ref": "#/$defs/propertyDefinitions/roadFlag" }
- type: object
allOf:
- { "$ref": "../defs.yaml#/$defs/propertyContainers/atRangeContainer" }
unevaluatedProperties: false
properties:
values:
type: array
items: { "$ref": "#/$defs/propertyDefinitions/roadFlag" }
uniqueItems: true
type: object
allOf:
- { "$ref": "../defs.yaml#/$defs/propertyContainers/atRangeContainer" }
unevaluatedProperties: false
properties:
values:
type: array
items: { "$ref": "#/$defs/propertyDefinitions/roadFlag" }
uniqueItems: true
uniqueItems: true
width:
description: >-
Expand Down

0 comments on commit c6ebccd

Please sign in to comment.