Skip to content

Commit ea4ae74

Browse files
committed
allow localhost API paths in schemas
1 parent 112f515 commit ea4ae74

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

jsondata/schemas/LitCalMetadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@
607607
},
608608
"api_path": {
609609
"type": "string",
610-
"pattern": "^https?:\\\/\\\/(?:litcal\\.johnromanodorazio\\.com\\\/api\\\/(?:dev|v[3-9])|localhost(?:\\:\\d+))\\\/data\\\/widerregion\\\/[ACEINOSW][flmnsueoc][rseatindo][a-zA-Z\\s]+\\?locale=\\{language\\}$"
610+
"pattern": "^https?:\\\/\\\/(?:litcal\\.johnromanodorazio\\.com\\\/api\\\/(?:dev|v[3-9])|localhost(?:\\:\\d{4}))\\\/data\\\/widerregion\\\/[ACEINOSW][flmnsueoc][rseatindo][a-zA-Z\\s]+\\?locale=\\{language\\}$"
611611
}
612612
},
613613
"required": ["name", "locales", "api_path"]

jsondata/schemas/LitCalMissalsPath.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"api_path": {
6767
"type": "string",
6868
"format": "uri",
69-
"pattern": "https?:\\\/\\\/litcal\\.johnromanodorazio\\.com\\\/api\\\/(dev|v[3-9])\\\/missals\\\/(EDITIO_TYPICA|IT|US|NL)_(19[7-9]|[2-9][0-9][0-9])[0-9]$"
69+
"pattern": "^https?:\\\/\\\/(?:litcal\\.johnromanodorazio\\.com\\\/api\\\/(?:dev|v[3-9])|localhost(?:\\:\\d{4}))\\\/missals\\\/(EDITIO_TYPICA|IT|US|NL)_(19[7-9]|[2-9][0-9][0-9])[0-9]$"
7070
}
7171
},
7272
"required": [

jsondata/schemas/LitCalSchemasPath.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"type": "array",
99
"items": {
1010
"type": "string",
11-
"pattern": "^https?:\\\/\\\/litcal\\.johnromanodorazio\\.com\\\/api\\\/(dev|v[3-9])\\\/jsondata\\\/schemas\\\/[a-zA-Z]+\\.json"
11+
"pattern": "^https?:\\\/\\\/(?:litcal\\.johnromanodorazio\\.com\\\/api\\\/(?:dev|v[3-9])|localhost(?:\\:\\d{4}))\\\/jsondata\\\/schemas\\\/[a-zA-Z]+\\.json"
1212
}
1313
}
1414
}

src/Health.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ private static function retrieveSchemaForCategory(string $category, ?string $dat
304304
$schema = LitSchema::DATA;
305305
foreach ($matches as $idx => $match) {
306306
if ($idx > 0) {
307-
switch ($matches[$idx]) {
307+
switch ($match) {
308308
case 'nation':
309309
$schema = LitSchema::NATIONAL;
310310
break;

0 commit comments

Comments
 (0)