diff --git a/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py b/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py index aa69209f..7a756295 100644 --- a/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py +++ b/dispatcher/backend/src/common/schemas/offliners/mwoffliner.py @@ -182,12 +182,18 @@ class Meta: "description": "Mediawiki wiki base path. Otherwise `/wiki/`.", } ) - mwApiPath = String( + mwActionApiPath = String( metadata={ "label": "API Path", "description": "Mediawiki API path. Otherwise `/w/api.php`.", } ) + mwRestApiPath = String( + metadata={ + "label": "REST API Path", + "description": "Mediawiki REST API path. Otherwise `/w/rest.php`.", + } + ) mwModulePath = String( metadata={ "label": "Module Path", @@ -270,3 +276,23 @@ class Meta: "description": "Convert images to Webp", }, ) + + forceRender = String( + metadata={ + "label": "Force Render", + "description": "Force the usage of a specific API end-point/render, " + "automatically chosen otherwise", + }, + validate=validate.OneOf( + ["VisualEditor", "WikimediaDesktop", "WikimediaMobile"] + ), + ) + + insecure = fields.Boolean( + truthy=[True], + falsy=[False], + metadata={ + "label": "Insecure", + "description": "Skip HTTPS server authenticity verification step", + }, + ) diff --git a/dispatcher/backend/src/tests/unit/routes/test_schedules_validators.py b/dispatcher/backend/src/tests/unit/routes/test_schedules_validators.py index ca8c6f46..3538aca0 100644 --- a/dispatcher/backend/src/tests/unit/routes/test_schedules_validators.py +++ b/dispatcher/backend/src/tests/unit/routes/test_schedules_validators.py @@ -72,7 +72,7 @@ def test_valid(self): "format": ["nopic", "novid", "nodet,nopic"], "keepEmptyParagraphs": False, "mwWikiPath": "/wiki", - "mwApiPath": "/w/api.php", + "mwActionApiPath": "/w/api.php", "mwModulePath": "/w/load.php", "mwDomain": "en.wikipedia.org", "mwUsername": "ausername", @@ -122,7 +122,7 @@ def test_extra_key(self): {"format": ["pic", 123]}, {"keepEmptyParagraphs": "True"}, {"mwWikiPath": 123}, - {"mwApiPath": 123}, + {"mwActionApiPath": 123}, {"mwModulePath": 123}, {"mwDomain": 123}, {"mwUsername": 123},