abian added a comment.
This is already working for the HTML pages of Wikidata. In T166470#6199846 <https://phabricator.wikimedia.org/T166470#6199846>, @abian wrote: > [X] A request for a page that is not a Wikibase entity does not generate a response with links to alternative structured representations. $ curl --head 'https://www.wikidata.org/wiki/Wikidata:Main_Page' | grep 'link:' # existing page in the Wikidata namespace ¯\_(ツ)_/¯ $ curl --head 'https://www.wikidata.org/wiki/EntitySchema:E2' | grep 'link:' # existing page in the EntitySchema namespace ¯\_(ツ)_/¯ $ curl --head 'https://www.wikidata.org/wiki/Q7' | grep 'link:' # non-existing Item ¯\_(ツ)_/¯ > [X] A request for a Wikibase Item generates a response with links to alternative structured representations. $ curl --head 'https://www.wikidata.org/wiki/Q5' | grep 'link:' link: <https://www.wikidata.org/wiki/Special:EntityData/Q5.json>; rel="alternate"; type="application/json",<https://www.wikidata.org/wiki/Special:EntityData/Q5.php>; rel="alternate"; type="application/vnd.php.serialized",<https://www.wikidata.org/wiki/Special:EntityData/Q5.rdf>; rel="alternate"; type="application/rdf+xml",<https://www.wikidata.org/wiki/Special:EntityData/Q5.n3>; rel="alternate"; type="text/n3",<https://www.wikidata.org/wiki/Special:EntityData/Q5.ttl>; rel="alternate"; type="text/turtle",<https://www.wikidata.org/wiki/Special:EntityData/Q5.nt>; rel="alternate"; type="application/n-triples",<https://www.wikidata.org/wiki/Special:EntityData/Q5.jsonld>; rel="alternate"; type="application/ld+json" > [X] A request for a Wikibase Property generates a response with links to alternative structured representations. $ curl --head 'https://www.wikidata.org/wiki/Property:P39' | grep 'link:' link: <https://www.wikidata.org/wiki/Special:EntityData/P39.json>; rel="alternate"; type="application/json",<https://www.wikidata.org/wiki/Special:EntityData/P39.php>; rel="alternate"; type="application/vnd.php.serialized",<https://www.wikidata.org/wiki/Special:EntityData/P39.rdf>; rel="alternate"; type="application/rdf+xml",<https://www.wikidata.org/wiki/Special:EntityData/P39.n3>; rel="alternate"; type="text/n3",<https://www.wikidata.org/wiki/Special:EntityData/P39.ttl>; rel="alternate"; type="text/turtle",<https://www.wikidata.org/wiki/Special:EntityData/P39.nt>; rel="alternate"; type="application/n-triples",<https://www.wikidata.org/wiki/Special:EntityData/P39.jsonld>; rel="alternate"; type="application/ld+json" > [X] The link headers are well formatted. They follow the pattern `<` + <url> + `>; rel="alternate"; type="` + <type> + `"`. > [X] All the alternative structured representations listed are available. They are. > [X] All the alternative structured representations available are listed. They are. According to Special:EntityData <https://www.wikidata.org/wiki/Special:EntityData>: "json, php, n3, ttl, nt, rdf, jsonld". > [X] All the alternative structured representations listed are about the requested Wikibase entity. They are. And it also seems to work on test.wikidata.org (and, by extension, any Wikibase installation from now on). $ curl --head 'https://test.wikidata.org/wiki/Q10' | grep 'link:' link: <https://test.wikidata.org/wiki/Special:EntityData/Q10.json>; rel="alternate"; type="application/json",<https://test.wikidata.org/wiki/Special:EntityData/Q10.php>; rel="alternate"; type="application/vnd.php.serialized",<https://test.wikidata.org/wiki/Special:EntityData/Q10.rdf>; rel="alternate"; type="application/rdf+xml",<https://test.wikidata.org/wiki/Special:EntityData/Q10.n3>; rel="alternate"; type="text/n3",<https://test.wikidata.org/wiki/Special:EntityData/Q10.ttl>; rel="alternate"; type="text/turtle",<https://test.wikidata.org/wiki/Special:EntityData/Q10.nt>; rel="alternate"; type="application/n-triples",<https://test.wikidata.org/wiki/Special:EntityData/Q10.jsonld>; rel="alternate"; type="application/ld+json" TASK DETAIL https://phabricator.wikimedia.org/T166470 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: abian Cc: Lucas_Werkmeister_WMDE, Ladsgroup, Lydia_Pintscher, Addshore, daniel, Aklapper, abian, Akuckartz, Iflorez, darthmon_wmde, alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, Chicocvenancio, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Wikidata-bugs, aude, Mbch331, Krenair
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
