Page MenuHomeWickedGov Phorge

mwapi-1.0.json
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

mwapi-1.0.json

{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "https://www.mediawiki.org/schema/mwapi-1.0",
"title": "MediaWiki REST API module definition",
"description": "Module definition files provide meta-data about modules and define the available routes. They are similar to OpenAPI specs.",
"type": "object",
"required": [
"mwapi",
"info",
"moduleId",
"paths"
],
"properties": {
"mwapi": {
"description": "The version of the MediaWiki module definition schema used by the document.",
"type": "string"
},
"moduleId": {
"description": "The module name, also used as the path prefix",
"type": "string"
},
"info": {
"$ref": "#/definitions/Info"
},
"paths": {
"description": "Information about the API routes available for interacting with the wiki.",
"type": "object",
"minProperties": 1,
"additionalProperties": {
"$ref": "#/definitions/Path"
}
}
},
"definitions": {
"Info": {
"allOf": [
{
"$ref": "https://spec.openapis.org/oas/3.0/schema/2021-09-28#/definitions/Info"
},
{
"$ref": "#/definitions/ExtraInfo"
}
]
},
"ExtraInfo": {
"type": "object"
},
"Path": {
"title": "REST API Path",
"description": "The operations available for a given path",
"type": "object",
"minProperties": 1,
"additionalProperties": {
"$ref": "#/definitions/Operation"
}
},
"Operation": {
"allOf": [
{
"$ref": "#/definitions/OperationInfo"
},
{
"$ref": "#/definitions/OperationImpl"
}
]
},
"OperationInfo": {
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"externalDocs": {
"$ref": "https://spec.openapis.org/oas/3.0/schema/2021-09-28#/definitions/ExternalDocumentation"
}
}
},
"OperationImpl": {
"oneOf": [
{
"$ref": "#/definitions/WithHandler"
},
{
"$ref": "#/definitions/WithRedirect"
}
]
},
"WithHandler": {
"required": [
"handler"
],
"properties": {
"handler": {
"$ref": "#/definitions/MWObjectSpec"
}
}
},
"MWObjectSpec": {
"type": "object",
"description": "An object-spec for use with the wikimedia/object-factory package.",
"properties": {
"class": {
"type": "string",
"description": "PHP class name of the object to create. If 'factory' is also specified, it will be used to validate the object."
},
"factory": {
"type": [
"string",
"array"
],
"description": "Factory method for creating the object (a PHP callable)."
},
"args": {
"type": "array",
"description": "Arguments to pass to the constructor or the factory method."
},
"services": {
"type": "array",
"item": {
"type": "string"
},
"description": "List of services to pass as arguments. Each name will be looked up in MediaWikiServices."
},
"optional_services": {
"type": "array",
"item": {
"type": "string"
},
"description": "List of services to pass as arguments. Each name will be looked up in MediaWikiServices. If the service is unknown the parameter is set to 'null' instead of causing an error."
}
},
"additionalProperties": true
},
"WithRedirect": {
"required": [
"redirect"
],
"properties": {
"redirect": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string"
},
"code": {
"type": "integer"
}
},
"additionalProperties": false
}
}
}
}
}

File Metadata

Mime Type
application/json
Expires
Aug 20 2026, 00:29 (9 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
35/30/7983c76404d9e2d81a5a8eb2208f
Default Alt Text
mwapi-1.0.json (3 KB)

Event Timeline