aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extension.schema.v2.json
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2019-06-13 22:18:21 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2019-06-13 22:18:21 +0000
commit7c966af21ad97198ed46513588c27a90014fe81f (patch)
treee7c27091e3504bbe9bb42ceed38d516063425d10 /docs/extension.schema.v2.json
parentd3c393e41651d5b447c8c7b46f2b1455ec1bd154 (diff)
parent3f0056a252daa4e97396e0eb4b72651f33ce57b3 (diff)
downloadmediawikicore-7c966af21ad97198ed46513588c27a90014fe81f.tar.gz
mediawikicore-7c966af21ad97198ed46513588c27a90014fe81f.zip
Merge "REST API initial commit"
Diffstat (limited to 'docs/extension.schema.v2.json')
-rw-r--r--docs/extension.schema.v2.json40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/extension.schema.v2.json b/docs/extension.schema.v2.json
index 60765814d336..c1db2b6e4a76 100644
--- a/docs/extension.schema.v2.json
+++ b/docs/extension.schema.v2.json
@@ -890,6 +890,46 @@
"type": "array",
"description": "List of service wiring files to be loaded by the default instance of MediaWikiServices"
},
+ "RestRoutes": {
+ "type": "array",
+ "description": "List of route specifications to be added to the REST API",
+ "items": {
+ "type": "object",
+ "properties": {
+ "method": {
+ "oneOf": [
+ {
+ "type": "string",
+ "description": "The HTTP method name"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "description": "An acceptable HTTP method name"
+ }
+ }
+ ]
+ },
+ "path": {
+ "type": "string",
+ "description": "The path template. This should start with an initial slash, designating the root of the REST API. Path parameters are enclosed in braces, for example /endpoint/{param}."
+ },
+ "factory": {
+ "type": ["string", "array"],
+ "description": "A factory function to be called to create the handler for this route"
+ },
+ "class": {
+ "type": "string",
+ "description": "The fully-qualified class name of the handler. This should be omitted if a factory is specified."
+ },
+ "args": {
+ "type": "array",
+ "description": "The arguments passed to the handler constructor or factory"
+ }
+ }
+ }
+ },
"attributes": {
"description":"Registration information for other extensions",
"type": "object",