wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/rest-api/specs/resources/properties/requests.json

Summary

Maintainability
Test Coverage
{
    "Property": {
        "description": "Payload containing a Wikibase Property and edit metadata",
        "required": true,
        "content": {
            "application/json": {
                "schema": {
                    "allOf": [
                        {
                            "type": "object",
                            "properties": {
                                "property": { "$ref": "../../global/schemas.json#/Property" }
                            },
                            "required": [ "property" ]
                        },
                        { "$ref": "../../global/request-parts.json#/MediawikiEdit" }
                    ]
                },
                "example": {
                    "property": {
                        "data_type": "wikibase-item",
                        "labels": {
                            "en": "instance of",
                            "ru": "это частный случай понятия"
                        },
                        "descriptions": {
                            "en": "this item is a concrete object (instance) of this class, category or object group",
                            "ru": "данный элемент представляет собой конкретный объект (экземпляр / частный случай) класса, категории"
                        },
                        "aliases": {
                            "en": [
                                "is a",
                                "is an"
                            ],
                            "ru": [
                                "представляет собой",
                                "является"
                            ]
                        },
                        "statements": {
                            "P1628": [
                                {
                                    "property": { "id":"P1628" },
                                    "value": {
                                        "type": "value",
                                        "content": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        }
    },
    "PatchProperty": {
        "required": true,
        "content": {
            "application/json-patch+json": {
                "schema": { "$ref": "../../global/request-parts.json#/PatchRequest" },
                "example": { "$ref": "./examples.json#/PatchPropertyExample" }
            },
            "application/json": {
                "schema": { "$ref": "../../global/request-parts.json#/PatchRequest" },
                "example": { "$ref": "./examples.json#/PatchPropertyExample" }
            }
        }
    }
}