Skip to content

Commit

Permalink
fix: district of a location can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyZandvliet authored and JaZo committed Oct 22, 2024
1 parent aa2d88e commit 1a8856c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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

0 comments on commit 1a8856c

Please sign in to comment.