Skip to content

Commit

Permalink
fix handling of default schemas - will need to change it at some point
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Jun 15, 2017
1 parent e74f975 commit a46e8ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Validators/DatapackageValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function getJsonSchemaFileFromRegistry($profile)
if ($filename = Registry::getJsonSchemaFile($profile)) {
return $filename;
} else {
return Registry::getJsonSchemaFile("data-package");
return parent::getJsonSchemaFileFromRegistry($profile);
}
}
}
2 changes: 1 addition & 1 deletion src/Validators/ResourceValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function getJsonSchemaFileFromRegistry($profile)
if ($filename = Registry::getJsonSchemaFile($profile)) {
return $filename;
} else {
return Registry::getJsonSchemaFile("data-resource");
return parent::getJsonSchemaFileFromRegistry($profile);
}
}
}
4 changes: 2 additions & 2 deletions tests/fixtures/fiscal-datapackage/datapackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "budget",
"title": "Budget",
"profile": "fiscal-data-resource",
"profile": "data-resource",
"data": ["budget.csv"],
"schema": {
"fields": [
Expand Down Expand Up @@ -43,7 +43,7 @@
{
"name": "entities",
"title": "Entities",
"profile": "fiscal-data-resource",
"profile": "data-resource",
"data": ["entities.csv"],
"schema": {
"fields": [
Expand Down

0 comments on commit a46e8ce

Please sign in to comment.