Go to file
Thiemo Kreuz 5f749c6418 Allow aliases to be integers in addition to strings
Parameter names in a template can be numeric. While it makes a lot of
sense to force a specific format in the TemplateData JSON (i.e. only
strings), it's inconvenient and confusing if numbers are rejected for
being "invalid".

Effects of this patch:
* The incoming JSON is allowed to contain numbers in the aliases
  array.
* However, the API normalizes these and forces all aliases to be
  strings, as it was always documented.
* The editor component accepts anything in the aliases array, but
  forces all aliases to be strings. Again, as documented.
* Note that it was never possible to use numeric keys in the `params`
  list. This patch is only about aliases.

At the moment this is a somewhat "hidden" feature. We might or might
not update the documentation to officially allow numeric aliases.

Bug: T298795
Change-Id: I32ea296b4520e7f21b03a1f6390db4f43b613bdd
2022-01-10 13:33:27 +01:00
.phan Track when (relevant) changes are made to <templatedata> tags 2020-12-07 15:34:13 +01:00
i18n Localisation updates from https://translatewiki.net. 2022-01-06 08:32:09 +01:00
includes Allow aliases to be integers in addition to strings 2022-01-10 13:33:27 +01:00
lib/jquery.uls Eventify TemplateDataGenerator and use oojs-ui 2014-12-22 12:58:37 -05:00
maintenance Namespace extension 2021-11-25 22:53:34 +00:00
modules Allow aliases to be integers in addition to strings 2022-01-10 13:33:27 +01:00
tests Allow aliases to be integers in addition to strings 2022-01-10 13:33:27 +01:00
.eslintrc.json build: Updating eslint-config-wikimedia to 0.19.0 2021-03-14 17:40:19 +00:00
.gitignore build: Update eslint-config-wikimedia to 0.11.0 2019-03-13 16:33:25 -07:00
.gitreview Whoops, track not trace 2016-10-24 17:03:53 -07:00
.phpcs.xml Track when (relevant) changes are made to <templatedata> tags 2020-12-07 15:34:13 +01:00
.stylelintrc.json Enforce stylelint grade-a config 2021-06-03 21:06:40 +01:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.3.0 2018-08-19 17:07:35 +00:00
composer.json Namespace extension 2021-11-25 22:53:34 +00:00
COPYING Use the plain-text GPL 2015-06-08 08:35:23 +02:00
extension.json Namespace extension 2021-11-25 22:53:34 +00:00
Gruntfile.js Fix Gruntfile.js path for stylelint 2020-08-25 16:01:44 +01:00
jsdoc.json Migrate from jsduck to jsdoc 2020-11-30 21:56:30 +01:00
package-lock.json build: Updating ansi-regex to 5.0.1 2021-10-09 07:27:24 +00:00
package.json build: Updating npm dependencies 2021-09-04 22:54:19 +00:00
Specification.md Omit the newline from EndFormat if no parameters are present 2021-06-29 13:49:49 -04:00