mediawiki-extensions-Templa.../modules
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
..
ext.templateData Avoid fit-content, not supported by all browsers 2021-06-03 21:53:40 +01:00
ext.templateData.images Organise resource files in directories after their module bundles 2020-03-15 15:21:39 +00:00
ext.templateDataGenerator.data Remove comma-delimiting code 2021-12-17 12:08:10 +01:00
ext.templateDataGenerator.editPage Organise resource files in directories after their module bundles 2020-03-15 15:21:39 +00:00
ext.templateDataGenerator.editTemplatePage Allow aliases to be integers in addition to strings 2022-01-10 13:33:27 +01:00