Addshore created this task.
Addshore added projects: Wikidata, Lexicographical data.

TASK DESCRIPTION

In the below example when creating a lexeme with the wbeditentity API module it looks as though the API is not going to output the created entity for me, which is fine (even though this api module does output the creation of items and properties).
But then the returned object does also include a claims key.

I guess the expected behaviour is actually:

  • Don't return any part of the entity created for lexemes, in which case the claims key should probably not be there
  • Return the created entity, in which case more things should be there.

Request:

POST /mediawiki/api.php HTTP/1.1
Host: default.web.mw.localhost:8080
Cache-Control: no-cache
Postman-Token: d5c7388c-4b46-cb91-fa5c-ac325214a94e
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="data"

{
            "lemmas": {
                "en": {
                    "language": "en",
                    "value": "lexeme1"
                }
            },
            "lexicalCategory": "Q1",
            "language": "Q1",
            "claims": {},
            "forms": [],
            "senses": []
        }
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="action"

wbeditentity
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="new"

lexeme
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="token"

+\
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="format"

json
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="id"

L11
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="clear"

1
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Result:

{
    "entity": {
        "claims": {},
        "id": "L10",
        "type": "lexeme",
        "lastrevid": 13
    },
    "success": 1
}

TASK DETAIL
https://phabricator.wikimedia.org/T202725

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Addshore
Cc: Addshore, Mringgaard, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Darkdadaah, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to