Dr0ptp4kt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/387629 )

Change subject: Further clarify extending ApiBase
......................................................................

Further clarify extending ApiBase

Bug T91456

Change-Id: I1b6fc3a9d2a9485da035c82ddf7cdfea31ccc506
---
M includes/ApiZeroBanner.php
1 file changed, 17 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner 
refs/changes/29/387629/1

diff --git a/includes/ApiZeroBanner.php b/includes/ApiZeroBanner.php
index 6e30bf0..b539672 100644
--- a/includes/ApiZeroBanner.php
+++ b/includes/ApiZeroBanner.php
@@ -10,6 +10,15 @@
  * Utility class to avoid any warnings or any other additions by the
  * API framework. This class extends ApiBase in order to shrink
  * responses for clients.
+ * As mentioned in https://gerrit.wikimedia.org/r/#/c/102850/
+ * one goal was to reduce the likelihood that the netmapper job, see
+ * "https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/
+ * varnish/libvmod-netmapper", which parses JSON responses as part of
+ * a scheduled server job, would enter an unreliable state. Additionally,
+ * dr0ptp4kt's recollection is that another goal was to remove
+ * any Action API wrapping envelope material to reduce the need to traverse
+ * the JSON object properties, as well as to have a minor (albeit
+ * arguably negligible) reduction in response payload size.
  * Class ApiRawJsonPrinter
  * @package ZeroBanner
  */
@@ -39,13 +48,18 @@
        }
 }
 
+/**
+ * This class extends ApiBase in order to generate Wikipedia Zero specific API
+ * responses. Clients, such as the native apps and JavaScript-capable clients,
+ * consume this API. The contract for the shape of the request/response has
+ * been solidified, and only additional fields should be *added* to the
+ * response (i.e., in a backward compatible manner) if at all in order to
+ * reduce the likelihood of breaking changes on legacy clients.
+ */
 class ApiZeroBanner extends ApiBase {
        /**
         * Override built-in handling of format parameter.
         * Only JSON is supported.
-        * This class extends ApiBase in order to generate Wikipedia Zero
-        * specific output, as used for example by native apps and
-        * JavaScript-capable clients.
         * @return ApiFormatBase
         */
        public function getCustomPrinter() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b6fc3a9d2a9485da035c82ddf7cdfea31ccc506
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt <[email protected]>

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

Reply via email to