From 9a5cb0a0602a7bb48d53926c75b76847cfb9a22d Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Mon, 18 Nov 2024 11:50:48 +0100 Subject: [PATCH] refactor for localhost development I didn't even make an issue, just while testing localhost development, I noticed I was not able to access three paths: `/data`, `/schemas`, and `/tests`. Just so happens that those three paths coincided with physical paths, there were folders of the same name. And PHP's builtin server just would not allow the router script to control the situation, it simply refused to serve those paths. I have therefore renamed these three folders by moving them all under a single `jsondata` folder, and refactoring all the code that referenced these folders. And now, localhost development seems to work just fine on all paths. --- README.md | 2 +- index.php | 2 + {schemas => jsondata/schemas}/CommonDef.json | 0 .../schemas}/DiocesanCalendar.json | 0 {schemas => jsondata/schemas}/Index.json | 0 {schemas => jsondata/schemas}/LitCal.json | 0 .../schemas}/LitCalDataPath.json | 0 .../schemas}/LitCalDecreesPath.json | 0 .../schemas}/LitCalEasterPath.json | 0 .../schemas}/LitCalEventsPath.json | 0 .../schemas}/LitCalMetadata.json | 0 .../schemas}/LitCalMissalsPath.json | 0 .../schemas}/LitCalSchemasPath.json | 0 {schemas => jsondata/schemas}/LitCalTest.json | 0 .../schemas}/LitCalTestsPath.json | 0 .../schemas}/LitCalTranslation.json | 0 .../schemas}/LiturgicalCalendar.xsd | 0 .../schemas}/NationalCalendar.json | 0 .../schemas}/PropriumDeSanctis.json | 0 .../schemas}/PropriumDeTempore.json | 0 .../schemas}/WiderRegionCalendar.json | 0 {schemas => jsondata/schemas}/openapi.json | 0 .../sourcedata}/decrees/decrees.json | 0 .../sourcedata}/decrees/i18n/de.json | 0 .../sourcedata}/decrees/i18n/en.json | 0 .../sourcedata}/decrees/i18n/es.json | 0 .../sourcedata}/decrees/i18n/fr.json | 0 .../sourcedata}/decrees/i18n/id.json | 0 .../sourcedata}/decrees/i18n/it.json | 0 .../sourcedata}/decrees/i18n/la.json | 0 .../sourcedata}/decrees/i18n/nl.json | 0 .../sourcedata}/decrees/i18n/pl.json | 0 .../sourcedata}/decrees/i18n/pt.json | 0 .../sourcedata}/decrees/i18n/sk.json | 0 .../propriumdesanctis_1970/i18n/de.json | 0 .../propriumdesanctis_1970/i18n/en.json | 0 .../propriumdesanctis_1970/i18n/es.json | 0 .../propriumdesanctis_1970/i18n/fr.json | 0 .../propriumdesanctis_1970/i18n/id.json | 0 .../propriumdesanctis_1970/i18n/it.json | 0 .../propriumdesanctis_1970/i18n/la.json | 0 .../propriumdesanctis_1970/i18n/nl.json | 0 .../propriumdesanctis_1970/i18n/pl.json | 0 .../propriumdesanctis_1970/i18n/pt.json | 0 .../propriumdesanctis_1970/i18n/sk.json | 0 .../propriumdesanctis_1970.json | 0 .../propriumdesanctis_2002/i18n/de.json | 0 .../propriumdesanctis_2002/i18n/en.json | 0 .../propriumdesanctis_2002/i18n/es.json | 0 .../propriumdesanctis_2002/i18n/fr.json | 0 .../propriumdesanctis_2002/i18n/id.json | 0 .../propriumdesanctis_2002/i18n/it.json | 0 .../propriumdesanctis_2002/i18n/la.json | 0 .../propriumdesanctis_2002/i18n/nl.json | 0 .../propriumdesanctis_2002/i18n/pl.json | 0 .../propriumdesanctis_2002/i18n/pt.json | 0 .../propriumdesanctis_2002/i18n/sk.json | 0 .../propriumdesanctis_2002.json | 0 .../propriumdesanctis_2008/i18n/de.json | 0 .../propriumdesanctis_2008/i18n/en.json | 0 .../propriumdesanctis_2008/i18n/es.json | 0 .../propriumdesanctis_2008/i18n/fr.json | 0 .../propriumdesanctis_2008/i18n/id.json | 0 .../propriumdesanctis_2008/i18n/it.json | 0 .../propriumdesanctis_2008/i18n/la.json | 0 .../propriumdesanctis_2008/i18n/nl.json | 0 .../propriumdesanctis_2008/i18n/pl.json | 0 .../propriumdesanctis_2008/i18n/pt.json | 0 .../propriumdesanctis_2008/i18n/sk.json | 0 .../propriumdesanctis_2008.json | 0 .../propriumdesanctis_IT_1983.json | 0 .../propriumdesanctis_US_2011.json | 0 .../missals/propriumdetempore/i18n/de.json | 0 .../missals/propriumdetempore/i18n/en.json | 0 .../missals/propriumdetempore/i18n/es.json | 0 .../missals/propriumdetempore/i18n/fr.json | 0 .../missals/propriumdetempore/i18n/id.json | 0 .../missals/propriumdetempore/i18n/it.json | 0 .../missals/propriumdetempore/i18n/la.json | 0 .../missals/propriumdetempore/i18n/nl.json | 0 .../missals/propriumdetempore/i18n/pl.json | 0 .../missals/propriumdetempore/i18n/pt.json | 0 .../missals/propriumdetempore/i18n/sk.json | 0 .../propriumdetempore/propriumdetempore.json | 0 .../nations/IT/Diocesi di Roma.json | 0 ... Sora - Cassino - Aquino - Pontecorvo.json | 0 .../sourcedata}/nations/IT/IT.json | 0 .../nations/NL/'s-Hertogenbosch.json | 0 .../sourcedata}/nations/NL/Breda.json | 0 .../nations/NL/Groningen-Leeuwarden.json | 0 .../nations/NL/Haarlem-Amsterdam.json | 0 .../sourcedata}/nations/NL/NL.json | 0 .../sourcedata}/nations/NL/Roermond.json | 0 .../sourcedata}/nations/NL/Rotterdam.json | 0 .../sourcedata}/nations/NL/Utrecht.json | 0 ...Archdiocese of Boston (Massachusetts).json | 0 .../sourcedata}/nations/US/US.json | 0 .../sourcedata}/nations/index.json | 20 +++---- .../wider_regions/AMERICAS/en_CA.json | 0 .../wider_regions/AMERICAS/en_US.json | 0 .../wider_regions/AMERICAS/es_419.json | 0 .../wider_regions/AMERICAS/es_AR.json | 0 .../wider_regions/AMERICAS/es_BO.json | 0 .../wider_regions/AMERICAS/es_BR.json | 0 .../wider_regions/AMERICAS/es_BZ.json | 0 .../wider_regions/AMERICAS/es_CL.json | 0 .../wider_regions/AMERICAS/es_CO.json | 0 .../wider_regions/AMERICAS/es_CR.json | 0 .../wider_regions/AMERICAS/es_CU.json | 0 .../wider_regions/AMERICAS/es_DO.json | 0 .../wider_regions/AMERICAS/es_EC.json | 0 .../wider_regions/AMERICAS/es_GT.json | 0 .../wider_regions/AMERICAS/es_HN.json | 0 .../wider_regions/AMERICAS/es_MX.json | 0 .../wider_regions/AMERICAS/es_NI.json | 0 .../wider_regions/AMERICAS/es_PA.json | 0 .../wider_regions/AMERICAS/es_PE.json | 0 .../wider_regions/AMERICAS/es_PR.json | 0 .../wider_regions/AMERICAS/es_PY.json | 0 .../wider_regions/AMERICAS/es_SV.json | 0 .../wider_regions/AMERICAS/fr_CA.json | 0 .../wider_regions/AMERICAS/pt_BR.json | 0 .../sourcedata}/wider_regions/ASIA/ja_JP.json | 0 .../wider_regions/ASIA/zh_Hans_CN.json | 0 .../sourcedata}/wider_regions/Americas.json | 0 .../sourcedata}/wider_regions/Asia.json | 0 .../wider_regions/EUROPE/bg_BG.json | 0 .../wider_regions/EUROPE/cs_CZ.json | 0 .../wider_regions/EUROPE/da_DK.json | 0 .../wider_regions/EUROPE/de_AT.json | 0 .../wider_regions/EUROPE/de_BE.json | 0 .../wider_regions/EUROPE/de_CH.json | 0 .../wider_regions/EUROPE/de_DE.json | 0 .../wider_regions/EUROPE/de_LI.json | 0 .../wider_regions/EUROPE/de_LU.json | 0 .../wider_regions/EUROPE/el_CY.json | 0 .../wider_regions/EUROPE/el_GR.json | 0 .../wider_regions/EUROPE/es_ES.json | 0 .../wider_regions/EUROPE/et_EE.json | 0 .../wider_regions/EUROPE/fi_FI.json | 0 .../wider_regions/EUROPE/fr_BE.json | 0 .../wider_regions/EUROPE/fr_FR.json | 0 .../wider_regions/EUROPE/ga_IE.json | 0 .../wider_regions/EUROPE/hr_HR.json | 0 .../wider_regions/EUROPE/hu_HU.json | 0 .../wider_regions/EUROPE/it_CH.json | 0 .../wider_regions/EUROPE/it_IT.json | 0 .../wider_regions/EUROPE/lb_LU.json | 0 .../wider_regions/EUROPE/lt_LT.json | 0 .../wider_regions/EUROPE/lv_LV.json | 0 .../wider_regions/EUROPE/mt_MT.json | 0 .../wider_regions/EUROPE/nl_NL.json | 0 .../wider_regions/EUROPE/pl_PL.json | 0 .../wider_regions/EUROPE/pt_PT.json | 0 .../wider_regions/EUROPE/ro_RO.json | 0 .../wider_regions/EUROPE/sk_SK.json | 0 .../wider_regions/EUROPE/sl_SI.json | 0 .../wider_regions/EUROPE/sv_SE.json | 0 .../wider_regions/EUROPE/tr_CY.json | 0 .../sourcedata}/wider_regions/Europe.json | 0 .../tests}/MaryMotherChurchTest.json | 0 .../tests}/NativityJohnBaptistTest.json | 0 .../tests}/PrayerUnbornTest.json | 0 .../tests}/StJaneFrancesDeChantalTest.json | 0 ...kenenmartelaarpatroonvanhetbisdomTest.json | 0 parseOpenAPI.js | 2 +- redocly.yaml | 4 +- src/Enum/RomanMissal.php | 16 ++--- src/Health.php | 14 ++--- src/LitTest.php | 4 +- src/Params/EventsParams.php | 8 +-- src/Paths/Calendar.php | 14 ++--- src/Paths/Decrees.php | 2 +- src/Paths/Events.php | 18 +++--- src/Paths/Metadata.php | 34 +++++------ src/Paths/Missals.php | 18 +++--- src/Paths/RegionalData.php | 58 +++++++++---------- src/Paths/Schemas.php | 6 +- src/Paths/Tests.php | 8 +-- 179 files changed, 116 insertions(+), 114 deletions(-) rename {schemas => jsondata/schemas}/CommonDef.json (100%) rename {schemas => jsondata/schemas}/DiocesanCalendar.json (100%) rename {schemas => jsondata/schemas}/Index.json (100%) rename {schemas => jsondata/schemas}/LitCal.json (100%) rename {schemas => jsondata/schemas}/LitCalDataPath.json (100%) rename {schemas => jsondata/schemas}/LitCalDecreesPath.json (100%) rename {schemas => jsondata/schemas}/LitCalEasterPath.json (100%) rename {schemas => jsondata/schemas}/LitCalEventsPath.json (100%) rename {schemas => jsondata/schemas}/LitCalMetadata.json (100%) rename {schemas => jsondata/schemas}/LitCalMissalsPath.json (100%) rename {schemas => jsondata/schemas}/LitCalSchemasPath.json (100%) rename {schemas => jsondata/schemas}/LitCalTest.json (100%) rename {schemas => jsondata/schemas}/LitCalTestsPath.json (100%) rename {schemas => jsondata/schemas}/LitCalTranslation.json (100%) rename {schemas => jsondata/schemas}/LiturgicalCalendar.xsd (100%) rename {schemas => jsondata/schemas}/NationalCalendar.json (100%) rename {schemas => jsondata/schemas}/PropriumDeSanctis.json (100%) rename {schemas => jsondata/schemas}/PropriumDeTempore.json (100%) rename {schemas => jsondata/schemas}/WiderRegionCalendar.json (100%) rename {schemas => jsondata/schemas}/openapi.json (100%) rename {data => jsondata/sourcedata}/decrees/decrees.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/de.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/en.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/es.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/fr.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/id.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/it.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/la.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/nl.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/pl.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/pt.json (100%) rename {data => jsondata/sourcedata}/decrees/i18n/sk.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/de.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/en.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/es.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/fr.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/id.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/it.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/la.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/nl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/pl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/pt.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/i18n/sk.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_1970/propriumdesanctis_1970.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/de.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/en.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/es.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/fr.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/id.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/it.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/la.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/nl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/pl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/pt.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/i18n/sk.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2002/propriumdesanctis_2002.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/de.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/en.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/es.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/fr.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/id.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/it.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/la.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/nl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/pl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/pt.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/i18n/sk.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_2008/propriumdesanctis_2008.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/de.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/en.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/es.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/fr.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/id.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/it.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/la.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/nl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/pl.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/pt.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/i18n/sk.json (100%) rename {data => jsondata/sourcedata}/missals/propriumdetempore/propriumdetempore.json (100%) rename {data => jsondata/sourcedata}/nations/IT/Diocesi di Roma.json (100%) rename {data => jsondata/sourcedata}/nations/IT/Diocesi di Sora - Cassino - Aquino - Pontecorvo.json (100%) rename {data => jsondata/sourcedata}/nations/IT/IT.json (100%) rename {data => jsondata/sourcedata}/nations/NL/'s-Hertogenbosch.json (100%) rename {data => jsondata/sourcedata}/nations/NL/Breda.json (100%) rename {data => jsondata/sourcedata}/nations/NL/Groningen-Leeuwarden.json (100%) rename {data => jsondata/sourcedata}/nations/NL/Haarlem-Amsterdam.json (100%) rename {data => jsondata/sourcedata}/nations/NL/NL.json (100%) rename {data => jsondata/sourcedata}/nations/NL/Roermond.json (100%) rename {data => jsondata/sourcedata}/nations/NL/Rotterdam.json (100%) rename {data => jsondata/sourcedata}/nations/NL/Utrecht.json (100%) rename {data => jsondata/sourcedata}/nations/US/Archdiocese of Boston (Massachusetts).json (100%) rename {data => jsondata/sourcedata}/nations/US/US.json (100%) rename {data => jsondata/sourcedata}/nations/index.json (60%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/en_CA.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/en_US.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_419.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_AR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_BO.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_BR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_BZ.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_CL.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_CO.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_CR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_CU.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_DO.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_EC.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_GT.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_HN.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_MX.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_NI.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_PA.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_PE.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_PR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_PY.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/es_SV.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/fr_CA.json (100%) rename {data => jsondata/sourcedata}/wider_regions/AMERICAS/pt_BR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/ASIA/ja_JP.json (100%) rename {data => jsondata/sourcedata}/wider_regions/ASIA/zh_Hans_CN.json (100%) rename {data => jsondata/sourcedata}/wider_regions/Americas.json (100%) rename {data => jsondata/sourcedata}/wider_regions/Asia.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/bg_BG.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/cs_CZ.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/da_DK.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/de_AT.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/de_BE.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/de_CH.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/de_DE.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/de_LI.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/de_LU.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/el_CY.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/el_GR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/es_ES.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/et_EE.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/fi_FI.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/fr_BE.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/fr_FR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/ga_IE.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/hr_HR.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/hu_HU.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/it_CH.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/it_IT.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/lb_LU.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/lt_LT.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/lv_LV.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/mt_MT.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/nl_NL.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/pl_PL.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/pt_PT.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/ro_RO.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/sk_SK.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/sl_SI.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/sv_SE.json (100%) rename {data => jsondata/sourcedata}/wider_regions/EUROPE/tr_CY.json (100%) rename {data => jsondata/sourcedata}/wider_regions/Europe.json (100%) rename {tests => jsondata/tests}/MaryMotherChurchTest.json (100%) rename {tests => jsondata/tests}/NativityJohnBaptistTest.json (100%) rename {tests => jsondata/tests}/PrayerUnbornTest.json (100%) rename {tests => jsondata/tests}/StJaneFrancesDeChantalTest.json (100%) rename {tests => jsondata/tests}/rotter_nl_HLaurentiusdiakenenmartelaarpatroonvanhetbisdomTest.json (100%) diff --git a/README.md b/README.md index 2d0f669a..436b13ca 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Translation status - OpenAPI validation result + OpenAPI validation result diff --git a/index.php b/index.php index 9816cc78..892eb915 100644 --- a/index.php +++ b/index.php @@ -57,6 +57,8 @@ * Perhaps we could find a better way to set this in a class such as Core ... */ define('API_BASE_PATH', "{$server_request_scheme}://{$server_name}"); +define('SCHEMAS_FOLDER', 'jsondata/schemas'); +define('TESTS_FOLDER', 'jsondata/tests'); if (false === Router::isLocalhost()) { Router::setAllowedOrigins('allowedOrigins.php'); diff --git a/schemas/CommonDef.json b/jsondata/schemas/CommonDef.json similarity index 100% rename from schemas/CommonDef.json rename to jsondata/schemas/CommonDef.json diff --git a/schemas/DiocesanCalendar.json b/jsondata/schemas/DiocesanCalendar.json similarity index 100% rename from schemas/DiocesanCalendar.json rename to jsondata/schemas/DiocesanCalendar.json diff --git a/schemas/Index.json b/jsondata/schemas/Index.json similarity index 100% rename from schemas/Index.json rename to jsondata/schemas/Index.json diff --git a/schemas/LitCal.json b/jsondata/schemas/LitCal.json similarity index 100% rename from schemas/LitCal.json rename to jsondata/schemas/LitCal.json diff --git a/schemas/LitCalDataPath.json b/jsondata/schemas/LitCalDataPath.json similarity index 100% rename from schemas/LitCalDataPath.json rename to jsondata/schemas/LitCalDataPath.json diff --git a/schemas/LitCalDecreesPath.json b/jsondata/schemas/LitCalDecreesPath.json similarity index 100% rename from schemas/LitCalDecreesPath.json rename to jsondata/schemas/LitCalDecreesPath.json diff --git a/schemas/LitCalEasterPath.json b/jsondata/schemas/LitCalEasterPath.json similarity index 100% rename from schemas/LitCalEasterPath.json rename to jsondata/schemas/LitCalEasterPath.json diff --git a/schemas/LitCalEventsPath.json b/jsondata/schemas/LitCalEventsPath.json similarity index 100% rename from schemas/LitCalEventsPath.json rename to jsondata/schemas/LitCalEventsPath.json diff --git a/schemas/LitCalMetadata.json b/jsondata/schemas/LitCalMetadata.json similarity index 100% rename from schemas/LitCalMetadata.json rename to jsondata/schemas/LitCalMetadata.json diff --git a/schemas/LitCalMissalsPath.json b/jsondata/schemas/LitCalMissalsPath.json similarity index 100% rename from schemas/LitCalMissalsPath.json rename to jsondata/schemas/LitCalMissalsPath.json diff --git a/schemas/LitCalSchemasPath.json b/jsondata/schemas/LitCalSchemasPath.json similarity index 100% rename from schemas/LitCalSchemasPath.json rename to jsondata/schemas/LitCalSchemasPath.json diff --git a/schemas/LitCalTest.json b/jsondata/schemas/LitCalTest.json similarity index 100% rename from schemas/LitCalTest.json rename to jsondata/schemas/LitCalTest.json diff --git a/schemas/LitCalTestsPath.json b/jsondata/schemas/LitCalTestsPath.json similarity index 100% rename from schemas/LitCalTestsPath.json rename to jsondata/schemas/LitCalTestsPath.json diff --git a/schemas/LitCalTranslation.json b/jsondata/schemas/LitCalTranslation.json similarity index 100% rename from schemas/LitCalTranslation.json rename to jsondata/schemas/LitCalTranslation.json diff --git a/schemas/LiturgicalCalendar.xsd b/jsondata/schemas/LiturgicalCalendar.xsd similarity index 100% rename from schemas/LiturgicalCalendar.xsd rename to jsondata/schemas/LiturgicalCalendar.xsd diff --git a/schemas/NationalCalendar.json b/jsondata/schemas/NationalCalendar.json similarity index 100% rename from schemas/NationalCalendar.json rename to jsondata/schemas/NationalCalendar.json diff --git a/schemas/PropriumDeSanctis.json b/jsondata/schemas/PropriumDeSanctis.json similarity index 100% rename from schemas/PropriumDeSanctis.json rename to jsondata/schemas/PropriumDeSanctis.json diff --git a/schemas/PropriumDeTempore.json b/jsondata/schemas/PropriumDeTempore.json similarity index 100% rename from schemas/PropriumDeTempore.json rename to jsondata/schemas/PropriumDeTempore.json diff --git a/schemas/WiderRegionCalendar.json b/jsondata/schemas/WiderRegionCalendar.json similarity index 100% rename from schemas/WiderRegionCalendar.json rename to jsondata/schemas/WiderRegionCalendar.json diff --git a/schemas/openapi.json b/jsondata/schemas/openapi.json similarity index 100% rename from schemas/openapi.json rename to jsondata/schemas/openapi.json diff --git a/data/decrees/decrees.json b/jsondata/sourcedata/decrees/decrees.json similarity index 100% rename from data/decrees/decrees.json rename to jsondata/sourcedata/decrees/decrees.json diff --git a/data/decrees/i18n/de.json b/jsondata/sourcedata/decrees/i18n/de.json similarity index 100% rename from data/decrees/i18n/de.json rename to jsondata/sourcedata/decrees/i18n/de.json diff --git a/data/decrees/i18n/en.json b/jsondata/sourcedata/decrees/i18n/en.json similarity index 100% rename from data/decrees/i18n/en.json rename to jsondata/sourcedata/decrees/i18n/en.json diff --git a/data/decrees/i18n/es.json b/jsondata/sourcedata/decrees/i18n/es.json similarity index 100% rename from data/decrees/i18n/es.json rename to jsondata/sourcedata/decrees/i18n/es.json diff --git a/data/decrees/i18n/fr.json b/jsondata/sourcedata/decrees/i18n/fr.json similarity index 100% rename from data/decrees/i18n/fr.json rename to jsondata/sourcedata/decrees/i18n/fr.json diff --git a/data/decrees/i18n/id.json b/jsondata/sourcedata/decrees/i18n/id.json similarity index 100% rename from data/decrees/i18n/id.json rename to jsondata/sourcedata/decrees/i18n/id.json diff --git a/data/decrees/i18n/it.json b/jsondata/sourcedata/decrees/i18n/it.json similarity index 100% rename from data/decrees/i18n/it.json rename to jsondata/sourcedata/decrees/i18n/it.json diff --git a/data/decrees/i18n/la.json b/jsondata/sourcedata/decrees/i18n/la.json similarity index 100% rename from data/decrees/i18n/la.json rename to jsondata/sourcedata/decrees/i18n/la.json diff --git a/data/decrees/i18n/nl.json b/jsondata/sourcedata/decrees/i18n/nl.json similarity index 100% rename from data/decrees/i18n/nl.json rename to jsondata/sourcedata/decrees/i18n/nl.json diff --git a/data/decrees/i18n/pl.json b/jsondata/sourcedata/decrees/i18n/pl.json similarity index 100% rename from data/decrees/i18n/pl.json rename to jsondata/sourcedata/decrees/i18n/pl.json diff --git a/data/decrees/i18n/pt.json b/jsondata/sourcedata/decrees/i18n/pt.json similarity index 100% rename from data/decrees/i18n/pt.json rename to jsondata/sourcedata/decrees/i18n/pt.json diff --git a/data/decrees/i18n/sk.json b/jsondata/sourcedata/decrees/i18n/sk.json similarity index 100% rename from data/decrees/i18n/sk.json rename to jsondata/sourcedata/decrees/i18n/sk.json diff --git a/data/missals/propriumdesanctis_1970/i18n/de.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/de.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/de.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/de.json diff --git a/data/missals/propriumdesanctis_1970/i18n/en.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/en.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/en.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/en.json diff --git a/data/missals/propriumdesanctis_1970/i18n/es.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/es.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/es.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/es.json diff --git a/data/missals/propriumdesanctis_1970/i18n/fr.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/fr.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/fr.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/fr.json diff --git a/data/missals/propriumdesanctis_1970/i18n/id.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/id.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/id.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/id.json diff --git a/data/missals/propriumdesanctis_1970/i18n/it.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/it.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/it.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/it.json diff --git a/data/missals/propriumdesanctis_1970/i18n/la.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/la.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/la.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/la.json diff --git a/data/missals/propriumdesanctis_1970/i18n/nl.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/nl.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/nl.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/nl.json diff --git a/data/missals/propriumdesanctis_1970/i18n/pl.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/pl.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/pl.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/pl.json diff --git a/data/missals/propriumdesanctis_1970/i18n/pt.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/pt.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/pt.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/pt.json diff --git a/data/missals/propriumdesanctis_1970/i18n/sk.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/sk.json similarity index 100% rename from data/missals/propriumdesanctis_1970/i18n/sk.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/sk.json diff --git a/data/missals/propriumdesanctis_1970/propriumdesanctis_1970.json b/jsondata/sourcedata/missals/propriumdesanctis_1970/propriumdesanctis_1970.json similarity index 100% rename from data/missals/propriumdesanctis_1970/propriumdesanctis_1970.json rename to jsondata/sourcedata/missals/propriumdesanctis_1970/propriumdesanctis_1970.json diff --git a/data/missals/propriumdesanctis_2002/i18n/de.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/de.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/de.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/de.json diff --git a/data/missals/propriumdesanctis_2002/i18n/en.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/en.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/en.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/en.json diff --git a/data/missals/propriumdesanctis_2002/i18n/es.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/es.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/es.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/es.json diff --git a/data/missals/propriumdesanctis_2002/i18n/fr.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/fr.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/fr.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/fr.json diff --git a/data/missals/propriumdesanctis_2002/i18n/id.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/id.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/id.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/id.json diff --git a/data/missals/propriumdesanctis_2002/i18n/it.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/it.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/it.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/it.json diff --git a/data/missals/propriumdesanctis_2002/i18n/la.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/la.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/la.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/la.json diff --git a/data/missals/propriumdesanctis_2002/i18n/nl.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/nl.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/nl.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/nl.json diff --git a/data/missals/propriumdesanctis_2002/i18n/pl.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/pl.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/pl.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/pl.json diff --git a/data/missals/propriumdesanctis_2002/i18n/pt.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/pt.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/pt.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/pt.json diff --git a/data/missals/propriumdesanctis_2002/i18n/sk.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/sk.json similarity index 100% rename from data/missals/propriumdesanctis_2002/i18n/sk.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/sk.json diff --git a/data/missals/propriumdesanctis_2002/propriumdesanctis_2002.json b/jsondata/sourcedata/missals/propriumdesanctis_2002/propriumdesanctis_2002.json similarity index 100% rename from data/missals/propriumdesanctis_2002/propriumdesanctis_2002.json rename to jsondata/sourcedata/missals/propriumdesanctis_2002/propriumdesanctis_2002.json diff --git a/data/missals/propriumdesanctis_2008/i18n/de.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/de.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/de.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/de.json diff --git a/data/missals/propriumdesanctis_2008/i18n/en.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/en.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/en.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/en.json diff --git a/data/missals/propriumdesanctis_2008/i18n/es.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/es.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/es.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/es.json diff --git a/data/missals/propriumdesanctis_2008/i18n/fr.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/fr.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/fr.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/fr.json diff --git a/data/missals/propriumdesanctis_2008/i18n/id.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/id.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/id.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/id.json diff --git a/data/missals/propriumdesanctis_2008/i18n/it.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/it.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/it.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/it.json diff --git a/data/missals/propriumdesanctis_2008/i18n/la.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/la.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/la.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/la.json diff --git a/data/missals/propriumdesanctis_2008/i18n/nl.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/nl.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/nl.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/nl.json diff --git a/data/missals/propriumdesanctis_2008/i18n/pl.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/pl.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/pl.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/pl.json diff --git a/data/missals/propriumdesanctis_2008/i18n/pt.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/pt.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/pt.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/pt.json diff --git a/data/missals/propriumdesanctis_2008/i18n/sk.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/sk.json similarity index 100% rename from data/missals/propriumdesanctis_2008/i18n/sk.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/sk.json diff --git a/data/missals/propriumdesanctis_2008/propriumdesanctis_2008.json b/jsondata/sourcedata/missals/propriumdesanctis_2008/propriumdesanctis_2008.json similarity index 100% rename from data/missals/propriumdesanctis_2008/propriumdesanctis_2008.json rename to jsondata/sourcedata/missals/propriumdesanctis_2008/propriumdesanctis_2008.json diff --git a/data/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json b/jsondata/sourcedata/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json similarity index 100% rename from data/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json rename to jsondata/sourcedata/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json diff --git a/data/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011.json b/jsondata/sourcedata/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011.json similarity index 100% rename from data/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011.json rename to jsondata/sourcedata/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011.json diff --git a/data/missals/propriumdetempore/i18n/de.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/de.json similarity index 100% rename from data/missals/propriumdetempore/i18n/de.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/de.json diff --git a/data/missals/propriumdetempore/i18n/en.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/en.json similarity index 100% rename from data/missals/propriumdetempore/i18n/en.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/en.json diff --git a/data/missals/propriumdetempore/i18n/es.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/es.json similarity index 100% rename from data/missals/propriumdetempore/i18n/es.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/es.json diff --git a/data/missals/propriumdetempore/i18n/fr.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/fr.json similarity index 100% rename from data/missals/propriumdetempore/i18n/fr.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/fr.json diff --git a/data/missals/propriumdetempore/i18n/id.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/id.json similarity index 100% rename from data/missals/propriumdetempore/i18n/id.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/id.json diff --git a/data/missals/propriumdetempore/i18n/it.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/it.json similarity index 100% rename from data/missals/propriumdetempore/i18n/it.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/it.json diff --git a/data/missals/propriumdetempore/i18n/la.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/la.json similarity index 100% rename from data/missals/propriumdetempore/i18n/la.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/la.json diff --git a/data/missals/propriumdetempore/i18n/nl.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/nl.json similarity index 100% rename from data/missals/propriumdetempore/i18n/nl.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/nl.json diff --git a/data/missals/propriumdetempore/i18n/pl.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/pl.json similarity index 100% rename from data/missals/propriumdetempore/i18n/pl.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/pl.json diff --git a/data/missals/propriumdetempore/i18n/pt.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/pt.json similarity index 100% rename from data/missals/propriumdetempore/i18n/pt.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/pt.json diff --git a/data/missals/propriumdetempore/i18n/sk.json b/jsondata/sourcedata/missals/propriumdetempore/i18n/sk.json similarity index 100% rename from data/missals/propriumdetempore/i18n/sk.json rename to jsondata/sourcedata/missals/propriumdetempore/i18n/sk.json diff --git a/data/missals/propriumdetempore/propriumdetempore.json b/jsondata/sourcedata/missals/propriumdetempore/propriumdetempore.json similarity index 100% rename from data/missals/propriumdetempore/propriumdetempore.json rename to jsondata/sourcedata/missals/propriumdetempore/propriumdetempore.json diff --git a/data/nations/IT/Diocesi di Roma.json b/jsondata/sourcedata/nations/IT/Diocesi di Roma.json similarity index 100% rename from data/nations/IT/Diocesi di Roma.json rename to jsondata/sourcedata/nations/IT/Diocesi di Roma.json diff --git a/data/nations/IT/Diocesi di Sora - Cassino - Aquino - Pontecorvo.json b/jsondata/sourcedata/nations/IT/Diocesi di Sora - Cassino - Aquino - Pontecorvo.json similarity index 100% rename from data/nations/IT/Diocesi di Sora - Cassino - Aquino - Pontecorvo.json rename to jsondata/sourcedata/nations/IT/Diocesi di Sora - Cassino - Aquino - Pontecorvo.json diff --git a/data/nations/IT/IT.json b/jsondata/sourcedata/nations/IT/IT.json similarity index 100% rename from data/nations/IT/IT.json rename to jsondata/sourcedata/nations/IT/IT.json diff --git a/data/nations/NL/'s-Hertogenbosch.json b/jsondata/sourcedata/nations/NL/'s-Hertogenbosch.json similarity index 100% rename from data/nations/NL/'s-Hertogenbosch.json rename to jsondata/sourcedata/nations/NL/'s-Hertogenbosch.json diff --git a/data/nations/NL/Breda.json b/jsondata/sourcedata/nations/NL/Breda.json similarity index 100% rename from data/nations/NL/Breda.json rename to jsondata/sourcedata/nations/NL/Breda.json diff --git a/data/nations/NL/Groningen-Leeuwarden.json b/jsondata/sourcedata/nations/NL/Groningen-Leeuwarden.json similarity index 100% rename from data/nations/NL/Groningen-Leeuwarden.json rename to jsondata/sourcedata/nations/NL/Groningen-Leeuwarden.json diff --git a/data/nations/NL/Haarlem-Amsterdam.json b/jsondata/sourcedata/nations/NL/Haarlem-Amsterdam.json similarity index 100% rename from data/nations/NL/Haarlem-Amsterdam.json rename to jsondata/sourcedata/nations/NL/Haarlem-Amsterdam.json diff --git a/data/nations/NL/NL.json b/jsondata/sourcedata/nations/NL/NL.json similarity index 100% rename from data/nations/NL/NL.json rename to jsondata/sourcedata/nations/NL/NL.json diff --git a/data/nations/NL/Roermond.json b/jsondata/sourcedata/nations/NL/Roermond.json similarity index 100% rename from data/nations/NL/Roermond.json rename to jsondata/sourcedata/nations/NL/Roermond.json diff --git a/data/nations/NL/Rotterdam.json b/jsondata/sourcedata/nations/NL/Rotterdam.json similarity index 100% rename from data/nations/NL/Rotterdam.json rename to jsondata/sourcedata/nations/NL/Rotterdam.json diff --git a/data/nations/NL/Utrecht.json b/jsondata/sourcedata/nations/NL/Utrecht.json similarity index 100% rename from data/nations/NL/Utrecht.json rename to jsondata/sourcedata/nations/NL/Utrecht.json diff --git a/data/nations/US/Archdiocese of Boston (Massachusetts).json b/jsondata/sourcedata/nations/US/Archdiocese of Boston (Massachusetts).json similarity index 100% rename from data/nations/US/Archdiocese of Boston (Massachusetts).json rename to jsondata/sourcedata/nations/US/Archdiocese of Boston (Massachusetts).json diff --git a/data/nations/US/US.json b/jsondata/sourcedata/nations/US/US.json similarity index 100% rename from data/nations/US/US.json rename to jsondata/sourcedata/nations/US/US.json diff --git a/data/nations/index.json b/jsondata/sourcedata/nations/index.json similarity index 60% rename from data/nations/index.json rename to jsondata/sourcedata/nations/index.json index 9324e6b6..f21aac8b 100644 --- a/data/nations/index.json +++ b/jsondata/sourcedata/nations/index.json @@ -1,63 +1,63 @@ [ { "calendar_id": "romamo_it", - "path": "data\/nations\/IT\/Diocesi di Roma.json", + "path": "jsondata\/sourcedata\/nations\/IT\/Diocesi di Roma.json", "nation": "IT", "diocese": "Diocesi di Roma", "group": "Diocesi del Lazio" }, { "calendar_id": "boston_us", - "path": "data\/nations\/US\/Archdiocese of Boston (Massachusetts).json", + "path": "jsondata\/sourcedata\/nations\/US\/Archdiocese of Boston (Massachusetts).json", "nation": "US", "diocese": "Archdiocese of Boston (Massachusetts)" }, { "calendar_id": "socaap_it", - "path": "data\/nations\/IT\/Diocesi di Sora - Cassino - Aquino - Pontecorvo.json", + "path": "jsondata\/sourcedata\/nations\/IT\/Diocesi di Sora - Cassino - Aquino - Pontecorvo.json", "nation": "IT", "diocese": "Diocesi di Sora - Cassino - Aquino - Pontecorvo", "group": "Diocesi del Lazio" }, { "calendar_id": "roermo_nl", - "path": "data\/nations\/NL\/Roermond.json", + "path": "jsondata\/sourcedata\/nations\/NL\/Roermond.json", "nation": "NL", "diocese": "Roermond" }, { "calendar_id": "sherto_nl", - "path": "data\/nations\/NL\/'s-Hertogenbosch.json", + "path": "jsondata\/sourcedata\/nations\/NL\/'s-Hertogenbosch.json", "nation": "NL", "diocese": "'s-Hertogenbosch" }, { "calendar_id": "utrech_nl", - "path": "data\/nations\/NL\/Utrecht.json", + "path": "jsondata\/sourcedata\/nations\/NL\/Utrecht.json", "nation": "NL", "diocese": "Utrecht" }, { "calendar_id": "rotter_nl", - "path": "data\/nations\/NL\/Rotterdam.json", + "path": "jsondata\/sourcedata\/nations\/NL\/Rotterdam.json", "nation": "NL", "diocese": "Rotterdam" }, { "calendar_id": "grolee_nl", - "path": "data\/nations\/NL\/Groningen-Leeuwarden.json", + "path": "jsondata\/sourcedata\/nations\/NL\/Groningen-Leeuwarden.json", "nation": "NL", "diocese": "Groningen-Leeuwarden" }, { "calendar_id": "bredad_nl", - "path": "data\/nations\/NL\/Breda.json", + "path": "jsondata\/sourcedata\/nations\/NL\/Breda.json", "nation": "NL", "diocese": "Breda" }, { "calendar_id": "haaams_nl", - "path": "data\/nations\/NL\/Haarlem-Amsterdam.json", + "path": "jsondata\/sourcedata\/nations\/NL\/Haarlem-Amsterdam.json", "nation": "NL", "diocese": "Haarlem-Amsterdam" } diff --git a/data/wider_regions/AMERICAS/en_CA.json b/jsondata/sourcedata/wider_regions/AMERICAS/en_CA.json similarity index 100% rename from data/wider_regions/AMERICAS/en_CA.json rename to jsondata/sourcedata/wider_regions/AMERICAS/en_CA.json diff --git a/data/wider_regions/AMERICAS/en_US.json b/jsondata/sourcedata/wider_regions/AMERICAS/en_US.json similarity index 100% rename from data/wider_regions/AMERICAS/en_US.json rename to jsondata/sourcedata/wider_regions/AMERICAS/en_US.json diff --git a/data/wider_regions/AMERICAS/es_419.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_419.json similarity index 100% rename from data/wider_regions/AMERICAS/es_419.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_419.json diff --git a/data/wider_regions/AMERICAS/es_AR.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_AR.json similarity index 100% rename from data/wider_regions/AMERICAS/es_AR.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_AR.json diff --git a/data/wider_regions/AMERICAS/es_BO.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_BO.json similarity index 100% rename from data/wider_regions/AMERICAS/es_BO.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_BO.json diff --git a/data/wider_regions/AMERICAS/es_BR.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_BR.json similarity index 100% rename from data/wider_regions/AMERICAS/es_BR.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_BR.json diff --git a/data/wider_regions/AMERICAS/es_BZ.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_BZ.json similarity index 100% rename from data/wider_regions/AMERICAS/es_BZ.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_BZ.json diff --git a/data/wider_regions/AMERICAS/es_CL.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_CL.json similarity index 100% rename from data/wider_regions/AMERICAS/es_CL.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_CL.json diff --git a/data/wider_regions/AMERICAS/es_CO.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_CO.json similarity index 100% rename from data/wider_regions/AMERICAS/es_CO.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_CO.json diff --git a/data/wider_regions/AMERICAS/es_CR.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_CR.json similarity index 100% rename from data/wider_regions/AMERICAS/es_CR.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_CR.json diff --git a/data/wider_regions/AMERICAS/es_CU.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_CU.json similarity index 100% rename from data/wider_regions/AMERICAS/es_CU.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_CU.json diff --git a/data/wider_regions/AMERICAS/es_DO.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_DO.json similarity index 100% rename from data/wider_regions/AMERICAS/es_DO.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_DO.json diff --git a/data/wider_regions/AMERICAS/es_EC.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_EC.json similarity index 100% rename from data/wider_regions/AMERICAS/es_EC.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_EC.json diff --git a/data/wider_regions/AMERICAS/es_GT.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_GT.json similarity index 100% rename from data/wider_regions/AMERICAS/es_GT.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_GT.json diff --git a/data/wider_regions/AMERICAS/es_HN.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_HN.json similarity index 100% rename from data/wider_regions/AMERICAS/es_HN.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_HN.json diff --git a/data/wider_regions/AMERICAS/es_MX.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_MX.json similarity index 100% rename from data/wider_regions/AMERICAS/es_MX.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_MX.json diff --git a/data/wider_regions/AMERICAS/es_NI.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_NI.json similarity index 100% rename from data/wider_regions/AMERICAS/es_NI.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_NI.json diff --git a/data/wider_regions/AMERICAS/es_PA.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_PA.json similarity index 100% rename from data/wider_regions/AMERICAS/es_PA.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_PA.json diff --git a/data/wider_regions/AMERICAS/es_PE.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_PE.json similarity index 100% rename from data/wider_regions/AMERICAS/es_PE.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_PE.json diff --git a/data/wider_regions/AMERICAS/es_PR.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_PR.json similarity index 100% rename from data/wider_regions/AMERICAS/es_PR.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_PR.json diff --git a/data/wider_regions/AMERICAS/es_PY.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_PY.json similarity index 100% rename from data/wider_regions/AMERICAS/es_PY.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_PY.json diff --git a/data/wider_regions/AMERICAS/es_SV.json b/jsondata/sourcedata/wider_regions/AMERICAS/es_SV.json similarity index 100% rename from data/wider_regions/AMERICAS/es_SV.json rename to jsondata/sourcedata/wider_regions/AMERICAS/es_SV.json diff --git a/data/wider_regions/AMERICAS/fr_CA.json b/jsondata/sourcedata/wider_regions/AMERICAS/fr_CA.json similarity index 100% rename from data/wider_regions/AMERICAS/fr_CA.json rename to jsondata/sourcedata/wider_regions/AMERICAS/fr_CA.json diff --git a/data/wider_regions/AMERICAS/pt_BR.json b/jsondata/sourcedata/wider_regions/AMERICAS/pt_BR.json similarity index 100% rename from data/wider_regions/AMERICAS/pt_BR.json rename to jsondata/sourcedata/wider_regions/AMERICAS/pt_BR.json diff --git a/data/wider_regions/ASIA/ja_JP.json b/jsondata/sourcedata/wider_regions/ASIA/ja_JP.json similarity index 100% rename from data/wider_regions/ASIA/ja_JP.json rename to jsondata/sourcedata/wider_regions/ASIA/ja_JP.json diff --git a/data/wider_regions/ASIA/zh_Hans_CN.json b/jsondata/sourcedata/wider_regions/ASIA/zh_Hans_CN.json similarity index 100% rename from data/wider_regions/ASIA/zh_Hans_CN.json rename to jsondata/sourcedata/wider_regions/ASIA/zh_Hans_CN.json diff --git a/data/wider_regions/Americas.json b/jsondata/sourcedata/wider_regions/Americas.json similarity index 100% rename from data/wider_regions/Americas.json rename to jsondata/sourcedata/wider_regions/Americas.json diff --git a/data/wider_regions/Asia.json b/jsondata/sourcedata/wider_regions/Asia.json similarity index 100% rename from data/wider_regions/Asia.json rename to jsondata/sourcedata/wider_regions/Asia.json diff --git a/data/wider_regions/EUROPE/bg_BG.json b/jsondata/sourcedata/wider_regions/EUROPE/bg_BG.json similarity index 100% rename from data/wider_regions/EUROPE/bg_BG.json rename to jsondata/sourcedata/wider_regions/EUROPE/bg_BG.json diff --git a/data/wider_regions/EUROPE/cs_CZ.json b/jsondata/sourcedata/wider_regions/EUROPE/cs_CZ.json similarity index 100% rename from data/wider_regions/EUROPE/cs_CZ.json rename to jsondata/sourcedata/wider_regions/EUROPE/cs_CZ.json diff --git a/data/wider_regions/EUROPE/da_DK.json b/jsondata/sourcedata/wider_regions/EUROPE/da_DK.json similarity index 100% rename from data/wider_regions/EUROPE/da_DK.json rename to jsondata/sourcedata/wider_regions/EUROPE/da_DK.json diff --git a/data/wider_regions/EUROPE/de_AT.json b/jsondata/sourcedata/wider_regions/EUROPE/de_AT.json similarity index 100% rename from data/wider_regions/EUROPE/de_AT.json rename to jsondata/sourcedata/wider_regions/EUROPE/de_AT.json diff --git a/data/wider_regions/EUROPE/de_BE.json b/jsondata/sourcedata/wider_regions/EUROPE/de_BE.json similarity index 100% rename from data/wider_regions/EUROPE/de_BE.json rename to jsondata/sourcedata/wider_regions/EUROPE/de_BE.json diff --git a/data/wider_regions/EUROPE/de_CH.json b/jsondata/sourcedata/wider_regions/EUROPE/de_CH.json similarity index 100% rename from data/wider_regions/EUROPE/de_CH.json rename to jsondata/sourcedata/wider_regions/EUROPE/de_CH.json diff --git a/data/wider_regions/EUROPE/de_DE.json b/jsondata/sourcedata/wider_regions/EUROPE/de_DE.json similarity index 100% rename from data/wider_regions/EUROPE/de_DE.json rename to jsondata/sourcedata/wider_regions/EUROPE/de_DE.json diff --git a/data/wider_regions/EUROPE/de_LI.json b/jsondata/sourcedata/wider_regions/EUROPE/de_LI.json similarity index 100% rename from data/wider_regions/EUROPE/de_LI.json rename to jsondata/sourcedata/wider_regions/EUROPE/de_LI.json diff --git a/data/wider_regions/EUROPE/de_LU.json b/jsondata/sourcedata/wider_regions/EUROPE/de_LU.json similarity index 100% rename from data/wider_regions/EUROPE/de_LU.json rename to jsondata/sourcedata/wider_regions/EUROPE/de_LU.json diff --git a/data/wider_regions/EUROPE/el_CY.json b/jsondata/sourcedata/wider_regions/EUROPE/el_CY.json similarity index 100% rename from data/wider_regions/EUROPE/el_CY.json rename to jsondata/sourcedata/wider_regions/EUROPE/el_CY.json diff --git a/data/wider_regions/EUROPE/el_GR.json b/jsondata/sourcedata/wider_regions/EUROPE/el_GR.json similarity index 100% rename from data/wider_regions/EUROPE/el_GR.json rename to jsondata/sourcedata/wider_regions/EUROPE/el_GR.json diff --git a/data/wider_regions/EUROPE/es_ES.json b/jsondata/sourcedata/wider_regions/EUROPE/es_ES.json similarity index 100% rename from data/wider_regions/EUROPE/es_ES.json rename to jsondata/sourcedata/wider_regions/EUROPE/es_ES.json diff --git a/data/wider_regions/EUROPE/et_EE.json b/jsondata/sourcedata/wider_regions/EUROPE/et_EE.json similarity index 100% rename from data/wider_regions/EUROPE/et_EE.json rename to jsondata/sourcedata/wider_regions/EUROPE/et_EE.json diff --git a/data/wider_regions/EUROPE/fi_FI.json b/jsondata/sourcedata/wider_regions/EUROPE/fi_FI.json similarity index 100% rename from data/wider_regions/EUROPE/fi_FI.json rename to jsondata/sourcedata/wider_regions/EUROPE/fi_FI.json diff --git a/data/wider_regions/EUROPE/fr_BE.json b/jsondata/sourcedata/wider_regions/EUROPE/fr_BE.json similarity index 100% rename from data/wider_regions/EUROPE/fr_BE.json rename to jsondata/sourcedata/wider_regions/EUROPE/fr_BE.json diff --git a/data/wider_regions/EUROPE/fr_FR.json b/jsondata/sourcedata/wider_regions/EUROPE/fr_FR.json similarity index 100% rename from data/wider_regions/EUROPE/fr_FR.json rename to jsondata/sourcedata/wider_regions/EUROPE/fr_FR.json diff --git a/data/wider_regions/EUROPE/ga_IE.json b/jsondata/sourcedata/wider_regions/EUROPE/ga_IE.json similarity index 100% rename from data/wider_regions/EUROPE/ga_IE.json rename to jsondata/sourcedata/wider_regions/EUROPE/ga_IE.json diff --git a/data/wider_regions/EUROPE/hr_HR.json b/jsondata/sourcedata/wider_regions/EUROPE/hr_HR.json similarity index 100% rename from data/wider_regions/EUROPE/hr_HR.json rename to jsondata/sourcedata/wider_regions/EUROPE/hr_HR.json diff --git a/data/wider_regions/EUROPE/hu_HU.json b/jsondata/sourcedata/wider_regions/EUROPE/hu_HU.json similarity index 100% rename from data/wider_regions/EUROPE/hu_HU.json rename to jsondata/sourcedata/wider_regions/EUROPE/hu_HU.json diff --git a/data/wider_regions/EUROPE/it_CH.json b/jsondata/sourcedata/wider_regions/EUROPE/it_CH.json similarity index 100% rename from data/wider_regions/EUROPE/it_CH.json rename to jsondata/sourcedata/wider_regions/EUROPE/it_CH.json diff --git a/data/wider_regions/EUROPE/it_IT.json b/jsondata/sourcedata/wider_regions/EUROPE/it_IT.json similarity index 100% rename from data/wider_regions/EUROPE/it_IT.json rename to jsondata/sourcedata/wider_regions/EUROPE/it_IT.json diff --git a/data/wider_regions/EUROPE/lb_LU.json b/jsondata/sourcedata/wider_regions/EUROPE/lb_LU.json similarity index 100% rename from data/wider_regions/EUROPE/lb_LU.json rename to jsondata/sourcedata/wider_regions/EUROPE/lb_LU.json diff --git a/data/wider_regions/EUROPE/lt_LT.json b/jsondata/sourcedata/wider_regions/EUROPE/lt_LT.json similarity index 100% rename from data/wider_regions/EUROPE/lt_LT.json rename to jsondata/sourcedata/wider_regions/EUROPE/lt_LT.json diff --git a/data/wider_regions/EUROPE/lv_LV.json b/jsondata/sourcedata/wider_regions/EUROPE/lv_LV.json similarity index 100% rename from data/wider_regions/EUROPE/lv_LV.json rename to jsondata/sourcedata/wider_regions/EUROPE/lv_LV.json diff --git a/data/wider_regions/EUROPE/mt_MT.json b/jsondata/sourcedata/wider_regions/EUROPE/mt_MT.json similarity index 100% rename from data/wider_regions/EUROPE/mt_MT.json rename to jsondata/sourcedata/wider_regions/EUROPE/mt_MT.json diff --git a/data/wider_regions/EUROPE/nl_NL.json b/jsondata/sourcedata/wider_regions/EUROPE/nl_NL.json similarity index 100% rename from data/wider_regions/EUROPE/nl_NL.json rename to jsondata/sourcedata/wider_regions/EUROPE/nl_NL.json diff --git a/data/wider_regions/EUROPE/pl_PL.json b/jsondata/sourcedata/wider_regions/EUROPE/pl_PL.json similarity index 100% rename from data/wider_regions/EUROPE/pl_PL.json rename to jsondata/sourcedata/wider_regions/EUROPE/pl_PL.json diff --git a/data/wider_regions/EUROPE/pt_PT.json b/jsondata/sourcedata/wider_regions/EUROPE/pt_PT.json similarity index 100% rename from data/wider_regions/EUROPE/pt_PT.json rename to jsondata/sourcedata/wider_regions/EUROPE/pt_PT.json diff --git a/data/wider_regions/EUROPE/ro_RO.json b/jsondata/sourcedata/wider_regions/EUROPE/ro_RO.json similarity index 100% rename from data/wider_regions/EUROPE/ro_RO.json rename to jsondata/sourcedata/wider_regions/EUROPE/ro_RO.json diff --git a/data/wider_regions/EUROPE/sk_SK.json b/jsondata/sourcedata/wider_regions/EUROPE/sk_SK.json similarity index 100% rename from data/wider_regions/EUROPE/sk_SK.json rename to jsondata/sourcedata/wider_regions/EUROPE/sk_SK.json diff --git a/data/wider_regions/EUROPE/sl_SI.json b/jsondata/sourcedata/wider_regions/EUROPE/sl_SI.json similarity index 100% rename from data/wider_regions/EUROPE/sl_SI.json rename to jsondata/sourcedata/wider_regions/EUROPE/sl_SI.json diff --git a/data/wider_regions/EUROPE/sv_SE.json b/jsondata/sourcedata/wider_regions/EUROPE/sv_SE.json similarity index 100% rename from data/wider_regions/EUROPE/sv_SE.json rename to jsondata/sourcedata/wider_regions/EUROPE/sv_SE.json diff --git a/data/wider_regions/EUROPE/tr_CY.json b/jsondata/sourcedata/wider_regions/EUROPE/tr_CY.json similarity index 100% rename from data/wider_regions/EUROPE/tr_CY.json rename to jsondata/sourcedata/wider_regions/EUROPE/tr_CY.json diff --git a/data/wider_regions/Europe.json b/jsondata/sourcedata/wider_regions/Europe.json similarity index 100% rename from data/wider_regions/Europe.json rename to jsondata/sourcedata/wider_regions/Europe.json diff --git a/tests/MaryMotherChurchTest.json b/jsondata/tests/MaryMotherChurchTest.json similarity index 100% rename from tests/MaryMotherChurchTest.json rename to jsondata/tests/MaryMotherChurchTest.json diff --git a/tests/NativityJohnBaptistTest.json b/jsondata/tests/NativityJohnBaptistTest.json similarity index 100% rename from tests/NativityJohnBaptistTest.json rename to jsondata/tests/NativityJohnBaptistTest.json diff --git a/tests/PrayerUnbornTest.json b/jsondata/tests/PrayerUnbornTest.json similarity index 100% rename from tests/PrayerUnbornTest.json rename to jsondata/tests/PrayerUnbornTest.json diff --git a/tests/StJaneFrancesDeChantalTest.json b/jsondata/tests/StJaneFrancesDeChantalTest.json similarity index 100% rename from tests/StJaneFrancesDeChantalTest.json rename to jsondata/tests/StJaneFrancesDeChantalTest.json diff --git a/tests/rotter_nl_HLaurentiusdiakenenmartelaarpatroonvanhetbisdomTest.json b/jsondata/tests/rotter_nl_HLaurentiusdiakenenmartelaarpatroonvanhetbisdomTest.json similarity index 100% rename from tests/rotter_nl_HLaurentiusdiakenenmartelaarpatroonvanhetbisdomTest.json rename to jsondata/tests/rotter_nl_HLaurentiusdiakenenmartelaarpatroonvanhetbisdomTest.json diff --git a/parseOpenAPI.js b/parseOpenAPI.js index c5e92ef3..0ba538be 100644 --- a/parseOpenAPI.js +++ b/parseOpenAPI.js @@ -5,7 +5,7 @@ */ var fs = require('fs'); -var openAPI = fs.readFileSync('schemas/openapi.json', 'utf8'); +var openAPI = fs.readFileSync('jsondata/schemas/openapi.json', 'utf8'); var obj = JSON.parse(openAPI); diff --git a/redocly.yaml b/redocly.yaml index 9b9d7463..a8a1abff 100644 --- a/redocly.yaml +++ b/redocly.yaml @@ -5,11 +5,11 @@ extends: apis: main: - root: ./schemas/openapi.json + root: ./jsondata/schemas/openapi.json #rules: # # A sample custom rule. Read more about rules: https://redocly.com/docs/cli/rules/ # rule/operation-description: - # subject: + # subject: # type: Operation # property: description # assertions: diff --git a/src/Enum/RomanMissal.php b/src/Enum/RomanMissal.php index 556b64d8..9c9ee048 100644 --- a/src/Enum/RomanMissal.php +++ b/src/Enum/RomanMissal.php @@ -65,23 +65,23 @@ class RomanMissal ]; public static array $jsonFiles = [ - self::EDITIO_TYPICA_1970 => "data/missals/propriumdesanctis_1970/propriumdesanctis_1970.json", + self::EDITIO_TYPICA_1970 => "jsondata/sourcedata/missals/propriumdesanctis_1970/propriumdesanctis_1970.json", self::REIMPRESSIO_EMENDATA_1971 => false, self::EDITIO_TYPICA_SECUNDA_1975 => false, - self::EDITIO_TYPICA_TERTIA_2002 => "data/missals/propriumdesanctis_2002/propriumdesanctis_2002.json", - self::EDITIO_TYPICA_TERTIA_EMENDATA_2008 => "data/missals/propriumdesanctis_2008/propriumdesanctis_2008.json", - self::USA_EDITION_2011 => "data/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011.json", - self::ITALY_EDITION_1983 => "data/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json", + self::EDITIO_TYPICA_TERTIA_2002 => "jsondata/sourcedata/missals/propriumdesanctis_2002/propriumdesanctis_2002.json", + self::EDITIO_TYPICA_TERTIA_EMENDATA_2008 => "jsondata/sourcedata/missals/propriumdesanctis_2008/propriumdesanctis_2008.json", + self::USA_EDITION_2011 => "jsondata/sourcedata/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011.json", + self::ITALY_EDITION_1983 => "jsondata/sourcedata/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json", self::ITALY_EDITION_2020 => false, self::NETHERLANDS_EDITION_1978 => false ]; public static array $i18nPath = [ - self::EDITIO_TYPICA_1970 => "data/missals/propriumdesanctis_1970/i18n/", + self::EDITIO_TYPICA_1970 => "jsondata/sourcedata/missals/propriumdesanctis_1970/i18n/", self::REIMPRESSIO_EMENDATA_1971 => false, self::EDITIO_TYPICA_SECUNDA_1975 => false, - self::EDITIO_TYPICA_TERTIA_2002 => "data/missals/propriumdesanctis_2002/i18n/", - self::EDITIO_TYPICA_TERTIA_EMENDATA_2008 => "data/missals/propriumdesanctis_2008/i18n/", + self::EDITIO_TYPICA_TERTIA_2002 => "jsondata/sourcedata/missals/propriumdesanctis_2002/i18n/", + self::EDITIO_TYPICA_TERTIA_EMENDATA_2008 => "jsondata/sourcedata/missals/propriumdesanctis_2008/i18n/", self::USA_EDITION_2011 => false, self::ITALY_EDITION_1983 => false, self::ITALY_EDITION_2020 => false, diff --git a/src/Health.php b/src/Health.php index a7a8c669..ee230a57 100644 --- a/src/Health.php +++ b/src/Health.php @@ -60,14 +60,14 @@ class Health implements MessageComponentInterface * @var string[] $DATA_PATH_TO_SCHEMA */ public const DATA_PATH_TO_SCHEMA = [ - "data/missals/propriumdetempore/propriumdetempore.json" => LitSchema::PROPRIUMDETEMPORE, - "data/missals/propriumdesanctis_1970/propriumdesanctis_1970.json" => LitSchema::PROPRIUMDESANCTIS, - "data/missals/propriumdesanctis_2002/propriumdesanctis_2002.json" => LitSchema::PROPRIUMDESANCTIS, - "data/missals/propriumdesanctis_2008/propriumdesanctis_2008.json" => LitSchema::PROPRIUMDESANCTIS, - "data/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json" + "jsondata/sourcedata/missals/propriumdetempore/propriumdetempore.json" => LitSchema::PROPRIUMDETEMPORE, + "jsondata/sourcedata/missals/propriumdesanctis_1970/propriumdesanctis_1970.json" => LitSchema::PROPRIUMDESANCTIS, + "jsondata/sourcedata/missals/propriumdesanctis_2002/propriumdesanctis_2002.json" => LitSchema::PROPRIUMDESANCTIS, + "jsondata/sourcedata/missals/propriumdesanctis_2008/propriumdesanctis_2008.json" => LitSchema::PROPRIUMDESANCTIS, + "jsondata/sourcedata/missals/propriumdesanctis_IT_1983/propriumdesanctis_IT_1983.json" => LitSchema::PROPRIUMDESANCTIS, - "data/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011" => LitSchema::PROPRIUMDESANCTIS, - "data/nations/index.json" => LitSchema::INDEX, + "jsondata/sourcedata/missals/propriumdesanctis_US_2011/propriumdesanctis_US_2011" => LitSchema::PROPRIUMDESANCTIS, + "jsondata/sourcedata/nations/index.json" => LitSchema::INDEX, API_BASE_PATH . '/calendars' => LitSchema::METADATA, API_BASE_PATH . '/decrees' => LitSchema::DECREES, API_BASE_PATH . '/events' => LitSchema::EVENTS, diff --git a/src/LitTest.php b/src/LitTest.php index 5ef59878..dc7e4119 100644 --- a/src/LitTest.php +++ b/src/LitTest.php @@ -55,13 +55,13 @@ public function __construct(string $Test, object $testData) self::$testCache = new \stdClass(); } if (false === property_exists(self::$testCache, $Test)) { - $testPath = "tests/{$Test}.json"; + $testPath = "jsondata/tests/{$Test}.json"; if (file_exists($testPath)) { $testInstructions = file_get_contents($testPath); if ($testInstructions) { $this->testInstructions = json_decode($testInstructions); if (JSON_ERROR_NONE === json_last_error()) { - $schemaFile = 'schemas/LitCalTest.json'; + $schemaFile = 'jsondata/schemas/LitCalTest.json'; $schemaContents = file_get_contents($schemaFile); $jsonSchema = json_decode($schemaContents); try { diff --git a/src/Params/EventsParams.php b/src/Params/EventsParams.php index b3cc73c4..7971d3df 100644 --- a/src/Params/EventsParams.php +++ b/src/Params/EventsParams.php @@ -47,17 +47,17 @@ public function __construct(array $DATA = []) $this->Locale = LitLocale::LATIN; } - $directories = array_map('basename', glob('data/nations/*', GLOB_ONLYDIR)); + $directories = array_map('basename', glob('jsondata/sourcedata/nations/*', GLOB_ONLYDIR)); //self::debugWrite(json_encode($directories)); foreach ($directories as $directory) { //self::debugWrite($directory); - if (file_exists("data/nations/$directory/$directory.json")) { + if (file_exists("jsondata/sourcedata/nations/$directory/$directory.json")) { $this->SupportedNationalCalendars[] = $directory; } } - if (file_exists("data/nations/index.json")) { - $DiocesesIndex = json_decode(file_get_contents("data/nations/index.json"), true); + if (file_exists("jsondata/sourcedata/nations/index.json")) { + $DiocesesIndex = json_decode(file_get_contents("jsondata/sourcedata/nations/index.json"), true); if (JSON_ERROR_NONE === json_last_error()) { $this->SupportedDiocesanCalendars = array_column($DiocesesIndex, 'calendar_id'); } diff --git a/src/Paths/Calendar.php b/src/Paths/Calendar.php index 7a970a3a..60688318 100644 --- a/src/Paths/Calendar.php +++ b/src/Paths/Calendar.php @@ -571,7 +571,7 @@ private function loadDiocesanCalendarData(): void if ($this->CalendarParams->DiocesanCalendar !== null) { //since a Diocesan calendar is being requested, we need to retrieve the JSON data //first we need to discover the path, so let's retrieve our index file - $dioceseIndexPath = "data/nations/index.json"; + $dioceseIndexPath = "jsondata/sourcedata/nations/index.json"; if (file_exists($dioceseIndexPath)) { $this->DioceseIndex = json_decode(file_get_contents($dioceseIndexPath)); $dioceseData = array_values(array_filter($this->DioceseIndex, function ($el) { @@ -686,7 +686,7 @@ private function dieIfBeforeMinYear(): void /** * Loads localization data stored in JSON format from a file in the - * data/missals/propriumdetempore/i18n directory, named according to the locale + * jsondata/sourcedata/missals/propriumdetempore/i18n directory, named according to the locale * specified in LitLocale::$PRIMARY_LANGUAGE. * * If the file does not exist, or if there is an error decoding the @@ -697,7 +697,7 @@ private function dieIfBeforeMinYear(): void private function loadPropriumDeTemporeI18nData(): ?array { $locale = LitLocale::$PRIMARY_LANGUAGE; - $propriumDeTemporeI18nFile = "data/missals/propriumdetempore/i18n/{$locale}.json"; + $propriumDeTemporeI18nFile = "jsondata/sourcedata/missals/propriumdetempore/i18n/{$locale}.json"; if (file_exists($propriumDeTemporeI18nFile)) { $rawData = file_get_contents($propriumDeTemporeI18nFile); $PropriumDeTemporeI18n = json_decode($rawData, true); @@ -724,7 +724,7 @@ private function loadPropriumDeTemporeI18nData(): ?array */ private function loadPropriumDeTemporeData(): void { - $propriumDeTemporeFile = "data/missals/propriumdetempore/propriumdetempore.json"; + $propriumDeTemporeFile = "jsondata/sourcedata/missals/propriumdetempore/propriumdetempore.json"; if (file_exists($propriumDeTemporeFile)) { $rawData = file_get_contents($propriumDeTemporeFile); $PropriumDeTempore = json_decode($rawData, true); @@ -852,8 +852,8 @@ private function loadPropriumDeSanctisData(string $missal): void */ private function loadMemorialsFromDecreesData(): void { - $decreesFile = "data/decrees/decrees.json"; - $decreesI18nPath = "data/decrees/i18n/"; + $decreesFile = "jsondata/sourcedata/decrees/decrees.json"; + $decreesI18nPath = "jsondata/sourcedata/decrees/i18n/"; $locale = LitLocale::$PRIMARY_LANGUAGE; $decreesI18nFile = $decreesI18nPath . $locale . ".json"; $NAME = null; @@ -3177,7 +3177,7 @@ private function calculateSaturdayMemorialBVM(): void */ private function loadNationalCalendarData(): void { - $nationalDataFile = "data/nations/{$this->CalendarParams->NationalCalendar}/{$this->CalendarParams->NationalCalendar}.json"; + $nationalDataFile = "jsondata/sourcedata/nations/{$this->CalendarParams->NationalCalendar}/{$this->CalendarParams->NationalCalendar}.json"; if (file_exists($nationalDataFile)) { $this->NationalData = json_decode(file_get_contents($nationalDataFile)); if (json_last_error() === JSON_ERROR_NONE) { diff --git a/src/Paths/Decrees.php b/src/Paths/Decrees.php index 2fd1a8ba..d9e46ee1 100644 --- a/src/Paths/Decrees.php +++ b/src/Paths/Decrees.php @@ -138,7 +138,7 @@ public static function init(array $requestPathParts = []) if (count($requestPathParts)) { self::$requestPathParts = $requestPathParts; } - $decreesFile = 'data/decrees/decrees.json'; + $decreesFile = 'jsondata/sourcedata/decrees/decrees.json'; if (file_exists($decreesFile)) { $rawData = file_get_contents($decreesFile); self::$decreesIndex = new \stdClass(); diff --git a/src/Paths/Events.php b/src/Paths/Events.php index 445506ce..32def6bb 100644 --- a/src/Paths/Events.php +++ b/src/Paths/Events.php @@ -65,9 +65,9 @@ private static function retrieveLatinMissals(): void */ private static function retrieveDioceseIndex(): void { - $DioceseIndexContents = file_exists("data/nations/index.json") ? file_get_contents("data/nations/index.json") : null; + $DioceseIndexContents = file_exists("jsondata/sourcedata/nations/index.json") ? file_get_contents("jsondata/sourcedata/nations/index.json") : null; if (null === $DioceseIndexContents || false === $DioceseIndexContents) { - echo self::produceErrorResponse(StatusCode::NOT_FOUND, "path data/nations/index.json not found"); + echo self::produceErrorResponse(StatusCode::NOT_FOUND, "path jsondata/sourcedata/nations/index.json not found"); die(); } self::$DioceseIndex = json_decode($DioceseIndexContents); @@ -219,9 +219,9 @@ private function handleRequestParams(): void /** * Loads the JSON data for the specified diocesan calendar. * - * If the diocese is not found in the diocesan calendars index or in the `data/nations/{nation}/` directory, the response will be a JSON error response with a status code of 404 Not Found. + * If the diocese is not found in the diocesan calendars index or in the `jsondata/sourcedata/nations/{nation}/` directory, the response will be a JSON error response with a status code of 404 Not Found. * If the diocese is not found in the diocesan calendars index, the response will be a JSON error response with a status code of 400 Bad Request. - * If the diocese is found in the diocesan calendars index but not in the `data/nations/{nation}/` directory, the response will be a JSON error response with a status code of 503 Service Unavailable. + * If the diocese is found in the diocesan calendars index but not in the `jsondata/sourcedata/nations/{nation}/` directory, the response will be a JSON error response with a status code of 503 Service Unavailable. * If the payload is not valid according to {@see LitSchema::DIOCESAN}, the response will be a JSON error response with a status code of 422 Unprocessable Content. * * @return void @@ -263,7 +263,7 @@ private function loadDiocesanData(): void private function loadNationalAndWiderRegionData(): void { if ($this->EventsParams->NationalCalendar !== null) { - $nationalDataFile = "data/nations/" . $this->EventsParams->NationalCalendar . "/" . $this->EventsParams->NationalCalendar . ".json"; + $nationalDataFile = "jsondata/sourcedata/nations/" . $this->EventsParams->NationalCalendar . "/" . $this->EventsParams->NationalCalendar . ".json"; if (file_exists($nationalDataFile)) { self::$NationalData = json_decode(file_get_contents($nationalDataFile)); if (json_last_error() === JSON_ERROR_NONE) { @@ -416,8 +416,8 @@ private function processMissalData(): void */ private function processPropriumDeTemporeData(): void { - $DataFile = 'data/missals/propriumdetempore/propriumdetempore.json'; - $I18nFile = 'data/missals/propriumdetempore/i18n/' . $this->EventsParams->Locale . ".json"; + $DataFile = 'jsondata/sourcedata/missals/propriumdetempore/propriumdetempore.json'; + $I18nFile = 'jsondata/sourcedata/missals/propriumdetempore/i18n/' . $this->EventsParams->Locale . ".json"; if (!file_exists($DataFile) || !file_exists($I18nFile)) { echo self::produceErrorResponse( StatusCode::NOT_FOUND, @@ -472,8 +472,8 @@ private function processPropriumDeTemporeData(): void */ private function processMemorialsFromDecreesData(): void { - $DataFile = 'data/decrees/decrees.json'; - $I18nFile = 'data/decrees/i18n/' . $this->EventsParams->Locale . ".json"; + $DataFile = 'jsondata/sourcedata/decrees/decrees.json'; + $I18nFile = 'jsondata/sourcedata/decrees/i18n/' . $this->EventsParams->Locale . ".json"; if (!file_exists($DataFile) || !file_exists($I18nFile)) { echo self::produceErrorResponse(StatusCode::NOT_FOUND, "Could not find resource file $DataFile or resource file $I18nFile"); die(); diff --git a/src/Paths/Metadata.php b/src/Paths/Metadata.php index 81c61d66..f728d593 100644 --- a/src/Paths/Metadata.php +++ b/src/Paths/Metadata.php @@ -17,10 +17,10 @@ class Metadata private static function retrieveNationalCalendarNamesFromFolders() { - $directories = array_map('basename', glob('data/nations/*', GLOB_ONLYDIR)); + $directories = array_map('basename', glob('jsondata/sourcedata/nations/*', GLOB_ONLYDIR)); foreach ($directories as $directory) { - if (file_exists("data/nations/$directory/$directory.json")) { - $nationalCalendarDefinition = file_get_contents("data/nations/$directory/$directory.json"); + if (file_exists("jsondata/sourcedata/nations/$directory/$directory.json")) { + $nationalCalendarDefinition = file_get_contents("jsondata/sourcedata/nations/$directory/$directory.json"); $nationalCalendarData = json_decode($nationalCalendarDefinition); if (JSON_ERROR_NONE === json_last_error()) { Metadata::$baseNationalCalendars[$directory] = $nationalCalendarData; @@ -34,7 +34,7 @@ private static function retrieveNationalCalendarNamesFromFolders() /** * @return void * @description - * This static function processes the contents of the data/wider_regions directory. + * This static function processes the contents of the jsondata/sourcedata/wider_regions directory. * It takes the files in the directory, checks if they are JSON files and if they are wider region definitions. * If they are, it reads the languages and builds the data for the wider region metadata. * The data is then stored in the Metadata::$widerRegions array. @@ -46,25 +46,25 @@ private static function retrieveNationalCalendarNamesFromFolders() private static function buildWiderRegionData() { $filterDirResults = ['..', '.']; - $dirResults = array_diff(scandir('data/wider_regions'), $filterDirResults); + $dirResults = array_diff(scandir('jsondata/sourcedata/wider_regions'), $filterDirResults); $widerRegionsFiles = array_values(array_filter($dirResults, function ($el) { - return !is_dir('data/wider_regions/' . $el) && pathinfo('data/wider_regions/' . $el, PATHINFO_EXTENSION) === 'json'; + return !is_dir('jsondata/sourcedata/wider_regions/' . $el) && pathinfo('jsondata/sourcedata/wider_regions/' . $el, PATHINFO_EXTENSION) === 'json'; })); Metadata::$widerRegions = array_map(function ($el) { - $dirName = strtoupper(pathinfo('data/wider_regions/' . $el, PATHINFO_FILENAME)); - $langsInFolder = array_diff(scandir("data/wider_regions/$dirName"), ['..','.']); + $dirName = strtoupper(pathinfo('jsondata/sourcedata/wider_regions/' . $el, PATHINFO_FILENAME)); + $langsInFolder = array_diff(scandir("jsondata/sourcedata/wider_regions/$dirName"), ['..','.']); $widerRegionLanguages = array_values(array_filter($langsInFolder, function ($elem) use ($dirName) { - return pathinfo("data/wider_regions/$dirName/$elem", PATHINFO_EXTENSION) === 'json'; + return pathinfo("jsondata/sourcedata/wider_regions/$dirName/$elem", PATHINFO_EXTENSION) === 'json'; })); - $widerRegionLanguages = array_map(fn ($el) => pathinfo("data/wider_regions/$dirName/$el", PATHINFO_FILENAME), $widerRegionLanguages); - $widerRegionName = pathinfo('data/wider_regions/' . $el, PATHINFO_FILENAME); + $widerRegionLanguages = array_map(fn ($el) => pathinfo("jsondata/sourcedata/wider_regions/$dirName/$el", PATHINFO_FILENAME), $widerRegionLanguages); + $widerRegionName = pathinfo('jsondata/sourcedata/wider_regions/' . $el, PATHINFO_FILENAME); Metadata::$widerRegionsNames[] = $widerRegionName; return [ "name" => $widerRegionName, "languages" => $widerRegionLanguages, - "data_path" => "data/wider_regions/$el", - "i18n_path" => "data/wider_regions/$dirName", - "api_path" => API_BASE_PATH . '/data/widerregion/' . pathinfo('data/wider_regions/' . $el, PATHINFO_FILENAME) . '?locale={language}' + "data_path" => "jsondata/sourcedata/wider_regions/$el", + "i18n_path" => "jsondata/sourcedata/wider_regions/$dirName", + "api_path" => API_BASE_PATH . '/data/widerregion/' . pathinfo('jsondata/sourcedata/wider_regions/' . $el, PATHINFO_FILENAME) . '?locale={language}' ]; }, $widerRegionsFiles); } @@ -121,7 +121,7 @@ private static function getLocales(): void private static function buildIndex(): int { // The first way of retrieving the names of currently supported National calendars - // is by scanning the `data/nations/` folder and picking out folder names + // is by scanning the `jsondata/sourcedata/nations/` folder and picking out folder names // for folders that contain a JSON file of the same name // If a folder doesn't contain a JSON file of the same name it's a Wider Region rather than a Nation // A National calendar can exist without any Diocesan calendars defined, @@ -130,11 +130,11 @@ private static function buildIndex(): int Metadata::retrieveNationalCalendarNamesFromFolders(); // Information about Diocesan Calendars is stored in an index.json file to make life easier - if (false === file_exists('data/nations/index.json')) { + if (false === file_exists('jsondata/sourcedata/nations/index.json')) { return StatusCode::NOT_FOUND; } - $index = file_get_contents('data/nations/index.json'); + $index = file_get_contents('jsondata/sourcedata/nations/index.json'); if (false === $index) { return StatusCode::SERVICE_UNAVAILABLE; } diff --git a/src/Paths/Missals.php b/src/Paths/Missals.php index 69b2547c..d98f4e88 100644 --- a/src/Paths/Missals.php +++ b/src/Paths/Missals.php @@ -342,12 +342,12 @@ public static function init(array $requestPathParts = []) self::$missalsIndex = new \stdClass(); self::$missalsIndex->litcal_missals = []; - if (false === is_readable('data/missals')) { - self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, 'Unable to read the data/missals directory'); + if (false === is_readable('jsondata/sourcedata/missals')) { + self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, 'Unable to read the jsondata/sourcedata/missals directory'); } - $missalFolderPaths = glob('data/missals/propriumdesanctis*', GLOB_ONLYDIR); + $missalFolderPaths = glob('jsondata/sourcedata/missals/propriumdesanctis*', GLOB_ONLYDIR); if (false === $missalFolderPaths) { - self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, 'Unable to read the data/missals directory contents'); + self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, 'Unable to read the jsondata/sourcedata/missals directory contents'); } if (count($missalFolderPaths) === 0) { self::produceErrorResponse(StatusCode::NOT_FOUND, 'No Missals found'); @@ -355,19 +355,19 @@ public static function init(array $requestPathParts = []) $missalFolderNames = array_map('basename', $missalFolderPaths); foreach ($missalFolderNames as $missalFolderName) { - if (file_exists("data/missals/$missalFolderName/$missalFolderName.json")) { + if (file_exists("jsondata/sourcedata/missals/$missalFolderName/$missalFolderName.json")) { $missal = new \stdClass(); if (preg_match('/^propriumdesanctis_([1-2][0-9][0-9][0-9])$/', $missalFolderName, $matches)) { $missal->missal_id = "EDITIO_TYPICA_{$matches[1]}"; $missal->region = "VA"; - if (is_readable("data/missals/$missalFolderName/i18n")) { - $it = new \DirectoryIterator("glob://data/missals/$missalFolderName/i18n/*.json"); + if (is_readable("jsondata/sourcedata/missals/$missalFolderName/i18n")) { + $it = new \DirectoryIterator("glob://jsondata/sourcedata/missals/$missalFolderName/i18n/*.json"); $languages = []; foreach ($it as $f) { $languages[] = $f->getBasename('.json'); } $missal->languages = $languages; - $missal->i18n_path = "data/missals/$missalFolderName/i18n/"; + $missal->i18n_path = "jsondata/sourcedata/missals/$missalFolderName/i18n/"; } else { $missal->languages = null; $missal->i18n_path = null; @@ -381,7 +381,7 @@ public static function init(array $requestPathParts = []) $missal->name = RomanMissal::getName($missal->missal_id); $missal->year_limits = RomanMissal::$yearLimits[$missal->missal_id]; $missal->year_published = RomanMissal::$yearLimits[$missal->missal_id][ "since_year" ]; - $missal->data_path = "data/missals/$missalFolderName/$missalFolderName.json"; + $missal->data_path = "jsondata/sourcedata/missals/$missalFolderName/$missalFolderName.json"; $missal->api_path = API_BASE_PATH . "/missals/$missal->missal_id"; self::$missalsIndex->litcal_missals[] = $missal; self::$params->addMissalRegion($missal->region); diff --git a/src/Paths/RegionalData.php b/src/Paths/RegionalData.php index c5a9b3e4..1afc84a7 100644 --- a/src/Paths/RegionalData.php +++ b/src/Paths/RegionalData.php @@ -102,10 +102,10 @@ private function getRegionalCalendar(): void $calendarDataFile = $dioceseEntry[0]->path; break; case "WIDERREGIONCALENDAR": - $calendarDataFile = "data/wider_regions/{$this->params->key}.json"; + $calendarDataFile = "jsondata/sourcedata/wider_regions/{$this->params->key}.json"; break; case "NATIONALCALENDAR": - $calendarDataFile = "data/nations/{$this->params->key}/{$this->params->key}.json"; + $calendarDataFile = "jsondata/sourcedata/nations/{$this->params->key}/{$this->params->key}.json"; break; default: self::produceErrorResponse(StatusCode::BAD_REQUEST, "Invalid value <{$this->params->category}> for param `category`: valid values are: " . implode(', ', array_values(RegionalDataParams::EXPECTED_CATEGORIES))); @@ -118,13 +118,13 @@ private function getRegionalCalendar(): void $response = json_decode(file_get_contents($calendarDataFile)); $uKey = strtoupper($this->params->key); if ($this->params->category === "WIDERREGIONCALENDAR") { - $isMultilingual = is_dir("data/wider_regions/{$uKey}"); + $isMultilingual = is_dir("jsondata/sourcedata/wider_regions/{$uKey}"); if ($isMultilingual) { if (false === in_array($this->params->locale, $response->metadata->languages)) { self::produceErrorResponse(StatusCode::BAD_REQUEST, "Invalid value `{$this->params->locale}` for param `locale`. Valid values for current requested Wider region calendar data `{$this->params->key}` are: " . implode(', ', $response->metadata->languages)); } - if (file_exists("data/wider_regions/{$uKey}/{$this->params->locale}.json")) { - $localeData = json_decode(file_get_contents("data/wider_regions/{$uKey}/{$this->params->locale}.json")); + if (file_exists("jsondata/sourcedata/wider_regions/{$uKey}/{$this->params->locale}.json")) { + $localeData = json_decode(file_get_contents("jsondata/sourcedata/wider_regions/{$uKey}/{$this->params->locale}.json")); foreach ($response->litcal as $idx => $el) { $response->litcal[$idx]->festivity->name = $localeData->{$response->litcal[$idx]->festivity->event_key}; } @@ -143,7 +143,7 @@ private function getRegionalCalendar(): void * * This is a private method and should only be called from {@see handleRequestMethod}. * - * The resource is created or updated in the `data/` directory. + * The resource is created or updated in the `jsondata/sourcedata/` directory. * * If the payload is valid according to the associated schema, the response will be a JSON object * containing a success message. @@ -174,7 +174,7 @@ private function createRegionalCalendar(): void } $updateData->group = strip_tags($this->params->payload->group); } - $updateData->path = "data/nations/{$updateData->nation}"; + $updateData->path = "jsondata/sourcedata/nations/{$updateData->nation}"; if (!file_exists($updateData->path)) { mkdir($updateData->path, 0755, true); } @@ -201,7 +201,7 @@ private function createRegionalCalendar(): void * * It is private as it is called from {@see updateRegionalCalendar}. * - * The resource is created or updated in the `data/nations/` directory. + * The resource is created or updated in the `jsondata/sourcedata/nations/` directory. * * If the payload is valid according to {@see LitSchema::NATIONAL}, the response will be a JSON object * containing a success message. @@ -212,7 +212,7 @@ private function handleNationalCalendarUpdate() { $response = new \stdClass(); $region = $this->params->payload->metadata->region; - $path = "data/nations/{$region}"; + $path = "jsondata/sourcedata/nations/{$region}"; if (!file_exists($path)) { mkdir($path, 0755, true); } @@ -233,7 +233,7 @@ private function handleNationalCalendarUpdate() * * It is private as it is called from {@see updateRegionalCalendar}. * - * The resource is created or updated in the `data/wider_regions/` directory. + * The resource is created or updated in the `jsondata/sourcedata/wider_regions/` directory. * * If the payload is valid according to {@see LitSchema::WIDERREGION}, the response will be a JSON object * containing a success message. @@ -246,7 +246,7 @@ private function handleWiderRegionCalendarUpdate() $this->params->payload->metadata->wider_region = ucfirst(strtolower($this->params->payload->metadata->wider_region)); $widerRegion = strtoupper($this->params->payload->metadata->wider_region); if ($this->params->payload->metadata->multilingual === true) { - $path = "data/wider_regions/{$widerRegion}"; + $path = "jsondata/sourcedata/wider_regions/{$widerRegion}"; if (!file_exists($path)) { mkdir($path, 0755, true); } @@ -256,9 +256,9 @@ private function handleWiderRegionCalendarUpdate() } if (count($this->params->payload->metadata->languages) > 0) { foreach ($this->params->payload->metadata->languages as $iso) { - if (!file_exists("data/wider_regions/{$widerRegion}/{$iso}.json")) { + if (!file_exists("jsondata/sourcedata/wider_regions/{$widerRegion}/{$iso}.json")) { file_put_contents( - "data/wider_regions/{$widerRegion}/{$iso}.json", + "jsondata/sourcedata/wider_regions/{$widerRegion}/{$iso}.json", json_encode($translationJSON, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) ); } @@ -269,7 +269,7 @@ private function handleWiderRegionCalendarUpdate() $test = $this->validateDataAgainstSchema($this->params->payload, LitSchema::WIDERREGION); if ($test === true) { $data = json_encode($this->params->payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); - file_put_contents("data/wider_regions/{$this->params->payload->metadata->wider_region}.json", $data . PHP_EOL); + file_put_contents("jsondata/sourcedata/wider_regions/{$this->params->payload->metadata->wider_region}.json", $data . PHP_EOL); $response->success = "Calendar data created or updated for Wider Region \"{$this->params->payload->metadata->wider_region}\""; self::produceResponse(json_encode($response)); } else { @@ -282,12 +282,12 @@ private function handleWiderRegionCalendarUpdate() * * It is private as it is called from {@see updateRegionalCalendar}. * - * The resource is created or updated in the `data/nations/` directory. + * The resource is created or updated in the `jsondata/sourcedata/nations/` directory. * * If the payload is valid according to {@see LitSchema::DIOCESAN}, the response will be a JSON object * containing a success message. * - * If the resource to update is not found in the diocesan calendars index or in the `data/nations/{nation}/` directory, the response will be a JSON error response with a status code of 404 Not Found. + * If the resource to update is not found in the diocesan calendars index or in the `jsondata/sourcedata/nations/{nation}/` directory, the response will be a JSON error response with a status code of 404 Not Found. * If the payload is not an object, the response will be a JSON error response with a status code of 400 Bad Request. * If the resource to update is not writable or the write was not successful, the response will be a JSON error response with a status code of 503 Service Unavailable. * If the payload is not valid according to {@see LitSchema::DIOCESAN}, the response will be a JSON error response with a status code of 422 Unprocessable Content. @@ -303,7 +303,7 @@ private function handleDiocesanCalendarUpdate() || false === property_exists($dioceseEntry[0], 'path') ) { - self::produceErrorResponse(StatusCode::NOT_FOUND, "Cannot update diocesan calendar resource {$this->params->key}, not found in diocesan calendars index `data/nations/index.json`."); + self::produceErrorResponse(StatusCode::NOT_FOUND, "Cannot update diocesan calendar resource {$this->params->key}, not found in diocesan calendars index `jsondata/sourcedata/nations/index.json`."); } if (false === file_exists($dioceseEntry[0]->path)) { @@ -369,7 +369,7 @@ private function handleDiocesanCalendarUpdate() * * This is a private method and should only be called from {@see handleRequestMethod}. * - * The resource is created or updated in the `data/` directory. + * The resource is created or updated in the `jsondata/sourcedata/` directory. * * If the payload is valid according to the associated schema, the response will be a JSON object * containing a success message. @@ -395,7 +395,7 @@ private function updateRegionalCalendar() * * This is a private method and should only be called from {@see handleRequestMethod}. * - * The resource is deleted from the `data/` directory. + * The resource is deleted from the `jsondata/sourcedata/` directory. * * If the resource is successfully deleted, the response will be a JSON object * containing a success message. @@ -416,10 +416,10 @@ private function deleteRegionalCalendar() $calendarDataFile = $dioceseEntry[0]->path; break; case "WIDERREGIONCALENDAR": - $calendarDataFile = "data/wider_regions/{$this->params->key}.json"; + $calendarDataFile = "jsondata/sourcedata/wider_regions/{$this->params->key}.json"; break; case "NATIONALCALENDAR": - $calendarDataFile = "data/nations/{$this->params->key}/{$this->params->key}.json"; + $calendarDataFile = "jsondata/sourcedata/nations/{$this->params->key}/{$this->params->key}.json"; break; } if (file_exists($calendarDataFile)) { @@ -447,7 +447,7 @@ private function deleteRegionalCalendar() */ private function loadDiocesanCalendarsIndex() { - $diocesanIndexPath = "data/nations/index.json"; + $diocesanIndexPath = "jsondata/sourcedata/nations/index.json"; if (file_exists($diocesanIndexPath)) { $this->DiocesanCalendarsIndex = json_decode(file_get_contents($diocesanIndexPath)); } @@ -499,17 +499,17 @@ private function createOrUpdateIndex(DioceseIndexAction $action, ?object $data = self::produceErrorResponse(StatusCode::UNPROCESSABLE_CONTENT, json_encode($test)); } - if (false === file_exists("data/nations/index.json")) { - self::produceErrorResponse(StatusCode::NOT_FOUND, "Cannot update diocesan calendars index, not found in path data/nations/index.json."); + if (false === file_exists("jsondata/sourcedata/nations/index.json")) { + self::produceErrorResponse(StatusCode::NOT_FOUND, "Cannot update diocesan calendars index, not found in path jsondata/sourcedata/nations/index.json."); } - if (false === is_writable("data/nations/index.json")) { - self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, "Cannot update diocesan calendars index in path data/nations/index.json, check file and folder permissions."); + if (false === is_writable("jsondata/sourcedata/nations/index.json")) { + self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, "Cannot update diocesan calendars index in path jsondata/sourcedata/nations/index.json, check file and folder permissions."); } $jsonEncodedContents = json_encode($this->DiocesanCalendarsIndex, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); - if (false === file_put_contents("data/nations/index.json", $jsonEncodedContents . PHP_EOL)) { - self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, "Could not update diocesan calendars index in path data/nations/index.json."); + if (false === file_put_contents("jsondata/sourcedata/nations/index.json", $jsonEncodedContents . PHP_EOL)) { + self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, "Could not update diocesan calendars index in path jsondata/sourcedata/nations/index.json."); } } @@ -674,7 +674,7 @@ private function handleRequestParams(array $requestPathParts = []): void default: self::produceErrorResponse(StatusCode::BAD_REQUEST, "Unexpected path param {$requestPathParts[0]}, acceptable values are: nation, diocese, widerregion"); } - } elseif (count($requestPathParts)) { + } else { RegionalData::validateRequestPath($requestPathParts); $data = RegionalData::setDataFromPath($requestPathParts); } diff --git a/src/Paths/Schemas.php b/src/Paths/Schemas.php index 15139841..b7d66783 100644 --- a/src/Paths/Schemas.php +++ b/src/Paths/Schemas.php @@ -53,7 +53,7 @@ public static function retrieve(array $requestPathParts = []): void case 0: $schemaIndex = new \stdClass(); $schemaIndex->litcal_schemas = []; - $it = new \DirectoryIterator("glob://schemas/*.json"); + $it = new \DirectoryIterator("glob://jsondata/schemas/*.json"); foreach ($it as $f) { $schemaIndex->litcal_schemas[] = API_BASE_PATH . '/schemas/' . $f->getFilename(); } @@ -62,9 +62,9 @@ public static function retrieve(array $requestPathParts = []): void die(); break; case 1: - if (file_exists('schemas/' . $requestPathParts[0])) { + if (file_exists('jsondata/schemas/' . $requestPathParts[0])) { header('Content-Type: application/json; charset=utf-8'); - echo file_get_contents('schemas/' . $requestPathParts[0]); + echo file_get_contents('jsondata/schemas/' . $requestPathParts[0]); die(); } else { header($_SERVER[ "SERVER_PROTOCOL" ] . " 404 Not Found", true, 404); diff --git a/src/Paths/Tests.php b/src/Paths/Tests.php index 8f874475..f489675a 100644 --- a/src/Paths/Tests.php +++ b/src/Paths/Tests.php @@ -58,7 +58,7 @@ private static function sanitizeObjectValues(object &$data): void private static function handleGetRequest(): string { - $testsFolder = 'tests/'; + $testsFolder = 'jsondata/tests/'; if (count(self::$requestPathParts) === 0) { try { $response = new \stdClass(); @@ -89,7 +89,7 @@ private static function handleGetRequest(): string private static function handleDeleteRequest(): string { - $testsFolder = 'tests/'; + $testsFolder = 'jsondata/tests/'; if (count(self::$requestPathParts) === 1) { $testName = self::$requestPathParts[0]; if (file_exists("{$testsFolder}{$testName}.json")) { @@ -122,7 +122,7 @@ private static function handlePutRequest(): string } // Validate incoming data against unit test schema - $schemaFile = 'schemas/LitCalTest.json'; + $schemaFile = 'jsondata/schemas/LitCalTest.json'; $schemaContents = file_get_contents($schemaFile); $jsonSchema = json_decode($schemaContents); @@ -140,7 +140,7 @@ private static function handlePutRequest(): string // Sanitize data to avoid any possibility of script injection self::sanitizeObjectValues($data); - $bytesWritten = file_put_contents('tests/' . $data->name . '.json', json_encode($data, JSON_PRETTY_PRINT)); + $bytesWritten = file_put_contents('jsondata/tests/' . $data->name . '.json', json_encode($data, JSON_PRETTY_PRINT)); if (false === $bytesWritten) { return self::produceErrorResponse(StatusCode::SERVICE_UNAVAILABLE, "The server did not succeed in writing to disk the Unit Test. Please try again later or contact the service administrator for support."); } else {