2023-10-30 16:04:41 +00:00
|
|
|
{
|
2024-02-21 20:51:29 +00:00
|
|
|
"$schema": "https://www.mediawiki.org/schema/mwapi-1.0",
|
|
|
|
|
"mwapi": "1.0.0",
|
|
|
|
|
"moduleId": "test.v1",
|
|
|
|
|
"info": {
|
|
|
|
|
"title": "test",
|
|
|
|
|
"version": "1.0"
|
|
|
|
|
},
|
|
|
|
|
"paths": {
|
|
|
|
|
"/ModuleTest/HELLO/{name}": {
|
|
|
|
|
"get": {
|
|
|
|
|
"redirect": {
|
|
|
|
|
"path": "/test.v1/ModuleTest/hello/{name}"
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-30 16:04:41 +00:00
|
|
|
},
|
2024-02-21 20:51:29 +00:00
|
|
|
"/ModuleTest/hello/{name}": {
|
|
|
|
|
"get": {
|
|
|
|
|
"handler": {
|
|
|
|
|
"class": "MediaWiki\\Tests\\Rest\\Handler\\HelloHandler",
|
|
|
|
|
"hello": "hi!"
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-30 16:04:41 +00:00
|
|
|
},
|
2024-02-21 20:51:29 +00:00
|
|
|
"/ModuleTest/throw": {
|
|
|
|
|
"get": {
|
|
|
|
|
"handler": {
|
|
|
|
|
"factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::throwHandlerFactory"
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-30 16:04:41 +00:00
|
|
|
},
|
2024-02-21 20:51:29 +00:00
|
|
|
"/ModuleTest/fatal": {
|
|
|
|
|
"get": {
|
|
|
|
|
"handler": {
|
|
|
|
|
"factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::fatalHandlerFactory"
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-30 16:04:41 +00:00
|
|
|
},
|
2024-02-21 20:51:29 +00:00
|
|
|
"/ModuleTest/throwRedirect": {
|
|
|
|
|
"get": {
|
|
|
|
|
"handler": {
|
|
|
|
|
"factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::throwRedirectHandlerFactory"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/ModuleTest/throwWrapped": {
|
|
|
|
|
"get": {
|
|
|
|
|
"handler": {
|
|
|
|
|
"factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::throwWrappedHandlerFactory"
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-10-30 16:04:41 +00:00
|
|
|
}
|
2024-02-21 20:51:29 +00:00
|
|
|
}
|
2023-10-30 16:04:41 +00:00
|
|
|
}
|