| 1 | { |
| 2 | "$schema": "https://www.mediawiki.org/schema/mwapi-1.0", |
| 3 | "mwapi": "1.0.0", |
| 4 | "moduleId": "test.v1", |
| 5 | "info": { |
| 6 | "title": "test", |
| 7 | "version": "1.0" |
| 8 | }, |
| 9 | "paths": { |
| 10 | "/ModuleTest/HELLO/{name}": { |
| 11 | "get": { |
| 12 | "redirect": { |
| 13 | "path": "/test.v1/ModuleTest/hello/{name}" |
| 14 | } |
| 15 | } |
| 16 | }, |
| 17 | "/ModuleTest/hello/{name}": { |
| 18 | "get": { |
| 19 | "handler": { |
| 20 | "class": "MediaWiki\\Tests\\Rest\\Handler\\HelloHandler", |
| 21 | "hello": "hi!" |
| 22 | } |
| 23 | } |
| 24 | }, |
| 25 | "/ModuleTest/throw": { |
| 26 | "get": { |
| 27 | "handler": { |
| 28 | "factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::throwHandlerFactory" |
| 29 | } |
| 30 | } |
| 31 | }, |
| 32 | "/ModuleTest/fatal": { |
| 33 | "get": { |
| 34 | "handler": { |
| 35 | "factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::fatalHandlerFactory" |
| 36 | } |
| 37 | } |
| 38 | }, |
| 39 | "/ModuleTest/throwRedirect": { |
| 40 | "get": { |
| 41 | "handler": { |
| 42 | "factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::throwRedirectHandlerFactory" |
| 43 | } |
| 44 | } |
| 45 | }, |
| 46 | "/ModuleTest/throwWrapped": { |
| 47 | "get": { |
| 48 | "handler": { |
| 49 | "factory": "MediaWiki\\Tests\\Rest\\MockHandlerFactory::throwWrappedHandlerFactory" |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | } |