jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/390309 )

Change subject: Clean up titles object keys
......................................................................


Clean up titles object keys

Bug: T177431
Change-Id: I22091332656f8b2b73aa1a04c38ae29d7b1a9ba7
---
M lib/mobile-util.js
M spec.yaml
M test/features/summary/pagecontent.js
3 files changed, 15 insertions(+), 15 deletions(-)

Approvals:
  BearND: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 7e4cc1c..8385dd1 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -211,9 +211,9 @@
  */
 mUtil.buildTitleDictionary = function(title, lead) {
     return {
-        title: title.getPrefixedDBKey(),
-        normalized_title: lead.normalizedtitle,
-        display_title: lead.displaytitle,
+        canonical: title.getPrefixedDBKey(),
+        normalized: lead.normalizedtitle,
+        display: lead.displaytitle,
     };
 };
 
diff --git a/spec.yaml b/spec.yaml
index f07a2db..c82ef37 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -682,9 +682,9 @@
               namespace_id: /.+/
               namespace_text: /.*/
               titles:
-                title: /.+/
-                normalized_title: /.+/
-                display_title: /.+/
+                canonical: /.+/
+                normalized: /.+/
+                display: /.+/
               pageid: /.+/
               thumbnail:
                 source: /.+/
@@ -1287,19 +1287,19 @@
   titles_set:
     type: object
     properties:
-      title:
+      canonical:
         type: string
         description: the DB key (non-prefixed)
-      normalized_title:
+      normalized:
         type: string
         description: the normalized title 
(https://www.mediawiki.org/wiki/API:Query#Title_normalization)
-      display_title:
+      display:
         type: string
         description: the title as it should be displayed to the user
     required:
-      - title
-      - normalized_title
-      - display_title
+      - canonical
+      - normalized
+      - display
     additionalProperties: false
 
   content_urls:
diff --git a/test/features/summary/pagecontent.js 
b/test/features/summary/pagecontent.js
index 3e68355..5680597 100644
--- a/test/features/summary/pagecontent.js
+++ b/test/features/summary/pagecontent.js
@@ -27,9 +27,9 @@
                 assert.deepEqual(res.status, 200);
                 assert.deepEqual(res.body.type, 'standard');
                 assert.deepEqual(res.body.revision, 798652007);
-                assert.deepEqual(res.body.titles.title, "Foobar");
-                assert.deepEqual(res.body.titles.normalized_title, "Foobar");
-                assert.deepEqual(res.body.titles.display_title, "Foobar");
+                assert.deepEqual(res.body.titles.canonical, "Foobar");
+                assert.deepEqual(res.body.titles.normalized, "Foobar");
+                assert.deepEqual(res.body.titles.display, "Foobar");
                 assert.ok(res.body.extract.indexOf('foobar') > -1);
                 assert.ok(res.body.extract_html.indexOf('<b>foobar</b>') > -1);
             });

-- 
To view, visit https://gerrit.wikimedia.org/r/390309
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I22091332656f8b2b73aa1a04c38ae29d7b1a9ba7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: Ppchelko <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to