Skip to content

Commit

Permalink
Merge pull request #5 from swisnl/hotfix/location-city-can-be-null
Browse files Browse the repository at this point in the history
fix: city of a location can be null
  • Loading branch information
pjotrvdh authored Jan 22, 2025
2 parents f31f886 + 38f8caa commit 98c2b02
Show file tree
Hide file tree
Showing 3 changed files with 148,642 additions and 102,797 deletions.
2 changes: 1 addition & 1 deletion src/Models/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Location
{
public function __construct(
public string $city,
public ?string $city,
public string $road,
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 @@ -578,7 +578,14 @@
"additionalProperties": false,
"properties": {
"city": {
"type": "string"
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"road": {
"type": "string"
Expand All @@ -605,7 +612,6 @@
}
},
"required": [
"city",
"road"
],
"title": "Location"
Expand Down
Loading

0 comments on commit 98c2b02

Please sign in to comment.