Skip to content

Commit

Permalink
Merge pull request #4 from swisnl/hotfix/location-districts-can-be-null
Browse files Browse the repository at this point in the history
fix: district of a location can be null
  • Loading branch information
JaZo authored Oct 22, 2024
2 parents aa2d88e + 283ac74 commit d44fa3b
Show file tree
Hide file tree
Showing 4 changed files with 110,484 additions and 98,090 deletions.
2 changes: 1 addition & 1 deletion src/Models/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Location
public function __construct(
public string $city,
public string $road,
public string $district,
public ?string $district,
public string $comment,
) {
}
Expand Down
10 changes: 8 additions & 2 deletions tests/_files/situations-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,14 @@
"type": "string"
},
"district": {
"type": "string"
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"comment": {
"anyOf": [
Expand All @@ -599,7 +606,6 @@
},
"required": [
"city",
"district",
"road"
],
"title": "Location"
Expand Down
40 changes: 40 additions & 0 deletions tests/_fixtures/melvin.ndw.nu/melvinservice/rest/area/all.get.mock
Original file line number Diff line number Diff line change
Expand Up @@ -1958,5 +1958,45 @@
"id": 926,
"type": "RAILWAY",
"name": "ProRail"
},
{
"id": 1122,
"type": "RAILWAY",
"name": "ProRail Zuid-West"
},
{
"id": 1123,
"type": "RAILWAY",
"name": "ProRail Midden"
},
{
"id": 1124,
"type": "RAILWAY",
"name": "ProRail Oost"
},
{
"id": 1125,
"type": "RAILWAY",
"name": "ProRail Zee-Zevenaar"
},
{
"id": 1126,
"type": "RAILWAY",
"name": "ProRail Noord"
},
{
"id": 1127,
"type": "RAILWAY",
"name": "ProRail Zuid-Oost"
},
{
"id": 1128,
"type": "RAILWAY",
"name": "ProRail Zuid-Holland"
},
{
"id": 1129,
"type": "RAILWAY",
"name": "ProRail Noord-West"
}
]
Loading

0 comments on commit d44fa3b

Please sign in to comment.