wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/rest-api/specs/resources/aliases/aliases-in-language-for-property.json

Summary

Maintainability
Test Coverage
{
    "get": {
        "operationId": "getPropertyAliasesInLanguage",
        "tags": [ "aliases" ],
        "summary": "Retrieve a Property's aliases in a specific language",
        "parameters": [
            { "$ref": "../../global/parameters.json#/PropertyId" },
            { "$ref": "../../global/parameters.json#/LanguageCode" },
            { "$ref": "../../global/parameters.json#/IfNoneMatch" },
            { "$ref": "../../global/parameters.json#/IfModifiedSince" },
            { "$ref": "../../global/parameters.json#/IfMatch" },
            { "$ref": "../../global/parameters.json#/IfUnmodifiedSince" },
            { "$ref": "../../global/parameters.json#/Authorization" }
        ],
        "responses": {
            "200": { "$ref": "./responses.json#/PropertyAliasesInLanguage" },
            "304": { "$ref": "../../global/responses.json#/NotModified" },
            "400": { "$ref": "../../global/responses.json#/InvalidTermByLanguageInput" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    },
    "post": {
        "operationId": "addPropertyAliasesInLanguage",
        "tags": [ "aliases" ],
        "summary": "Create / Add a Property's aliases in a specific language",
        "parameters": [
            { "$ref": "../../global/parameters.json#/PropertyId" },
            { "$ref": "../../global/parameters.json#/LanguageCode" },
            { "$ref": "../../global/parameters.json#/IfNoneMatch" },
            { "$ref": "../../global/parameters.json#/IfModifiedSince" },
            { "$ref": "../../global/parameters.json#/IfMatch" },
            { "$ref": "../../global/parameters.json#/IfUnmodifiedSince" },
            { "$ref": "../../global/parameters.json#/Authorization" }
        ],
        "requestBody": {
            "description": "Payload containing a list of Wikibase aliases in the specified language and edit metadata",
            "required": true,
            "content": {
                "application/json": {
                    "schema": { "$ref": "./requests.json#/AddAliasesInLanguage" },
                    "example": {
                        "aliases": [ "is an" ],
                        "tags": [],
                        "bot": false,
                        "comment": "Add English alias"
                    }
                }
            }
        },
        "responses": {
            "200": {
                "description": "The updated list of aliases in a specific language",
                "$ref": "./responses.json#/PropertyAliasesInLanguage"
            },
            "201": {
                "description": "The newly created list of aliases in a specific language",
                "$ref": "./responses.json#/PropertyAliasesInLanguage"
            },
            "304": { "$ref": "../../global/responses.json#/NotModified" },
            "400": { "$ref": "../../global/responses.json#/InvalidAddAliasesInput" },
            "403": { "$ref": "../../global/responses.json#/PermissionDenied" },
            "404": { "$ref": "../../global/responses.json#/ResourceNotFound" },
            "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
            "429": { "$ref": "../../global/responses.json#/RequestLimitReached" },
            "500": { "$ref": "../../global/responses.json#/UnexpectedError" }
        }
    }

}