OpenSearch/modules/lang-painless
Stuart Tettemer 426c7a5e8f
Scripting: add available languages & contexts API (#49652) (#49815)
Adds `GET /_script_language` to support Kibana dynamic scripting
language selection.

Response contains whether `inline` and/or `stored` scripts are
enabled as determined by the `script.allowed_types` settings.

For each scripting language registered, such as `painless`,
`expression`, `mustache` or custom, available contexts for the language
are included as determined by the `script.allowed_contexts` setting.

Response format:
```
{
  "types_allowed": [
    "inline",
    "stored"
  ],
  "language_contexts": [
    {
      "language": "expression",
      "contexts": [
        "aggregation_selector",
        "aggs"
        ...
      ]
    },
    {
      "language": "painless",
      "contexts": [
        "aggregation_selector",
        "aggs",
        "aggs_combine",
        ...
      ]
    }
...
  ]
}
```

Fixes: #49463 

**Backport**
2019-12-04 16:18:22 -07:00
..
licenses Painless: Upgrade ASM to 7.2 (#49263) 2019-11-20 07:09:47 -08:00
spi Add annotations to Painless whitelist (#43239) 2019-06-24 09:27:24 -07:00
src Scripting: add available languages & contexts API (#49652) (#49815) 2019-12-04 16:18:22 -07:00
build.gradle Painless: Upgrade ASM to 7.2 (#49263) 2019-11-20 07:09:47 -08:00