Page MenuHomePhabricator

Definition endpoint doesn't include Spec version in content-type
Closed, ResolvedPublic

Description

Actual

curl -sI "https://en.wiktionary.org/api/rest_v1/page/definition/a" | grep -i \^content-type
content-type: application/json

Expected

curl -sI "https://en.wiktionary.org/api/rest_v1/page/definition/a" | grep -i \^content-type
Content-Type: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/definition/0.8.0"

Event Timeline

mobrovac edited projects, added Services (doing), HyperSwitch, RESTBase; removed Services.

Maybe related to that since @mobrovac mentioned possible storage module issues on IRC:

I manually purged https://en.wiktionary.org/wiki/fazer?action=purge but still don't see the update for the fix of T187430. The definition of this word should now include an object called parsedExamples but the following returned nothing:

curl -s "https://en.wiktionary.org/api/rest_v1/page/definition/fazer" | grep parsedExamples

@Pchelolo would this also fix the update issue from my previous comment, or is that a separate issue?

Yes, it should fix the update issue as well

Mentioned in SAL (#wikimedia-operations) [2018-04-10T10:51:17Z] <mobrovac@tin> Started deploy [restbase/deploy@29df9db]: Use the MCS-provided content-type in the definition response - T191809

Mentioned in SAL (#wikimedia-operations) [2018-04-10T11:15:36Z] <mobrovac@tin> Finished deploy [restbase/deploy@29df9db]: Use the MCS-provided content-type in the definition response - T191809 (duration: 24m 19s)

mobrovac assigned this task to Pchelolo.

The fix has been deployed. Note, however, that the correct content type will start appearing gradually as wiktionary definitions are being updated.

Thanks @bearND for noticing the bug and @Pchelolo for spotting the mistake in the definition end point configuration.

@Pchelolo @mobrovac Thank you for the patch and deploying it. I've purged a couple of pages but still don't see the updates. Does the purge trick not work for the definition endpoint?

Indeed they are not. I opened T192157: Re-render wiktionary definitions on user purges to fix it. Expect the fix for it to be deployed early next week.

why not clear the whole cache on schema change?