Skip to content

Commit edb8f47

Browse files
authored
Update unsupported APIs filter for JS converter (#90)
1 parent 8702cbe commit edb8f47

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,17 @@ Supported options:
107107
| `complete` | `boolean` | no | If `true`, generate a complete script. If `false`, only generate the request code. The default is `false`. |
108108
| `elasticsearchUrl` | `string` | no | The Elasticsearch endpoint to use. The default is `http://localhost:9200`. |
109109

110+
### javascript
111+
112+
The JavaScript exporter generates code for the Elasticsearch JavaScript client.
113+
114+
Supported options:
115+
116+
| Option name | Type | Required | Description |
117+
| ----------- | ---- | -------- | ----------- |
118+
| `printResponse` | `boolean` | no | If `true`, add code to print the response. The default is `false`. |
119+
| `complete` | `boolean` | no | If `true`, generate a complete script. If `false`, only generate the request code. The default is `false`. |
120+
| `elasticsearchUrl` | `string` | no | The Elasticsearch endpoint to use in the generated commands. The default is `http://localhost:9200`. |
110121

111122
### php
112123

src/exporters/javascript.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,7 @@ import { FormatExporter, ConvertOptions } from "../convert";
77
import { ParsedRequest } from "../parse";
88
import "./templates";
99

10-
const UNSUPPORTED_APIS = new RegExp(
11-
"^query_rules.*$" +
12-
"|^connector.update_features$" +
13-
"|^connector.sync_job_.*$" +
14-
"|^ingest.get_geoip_database$" +
15-
"|^ingest.put_geoip_database$" +
16-
"|^ingest.delete_geoip_database$" +
17-
"|^_internal.*$" +
18-
"|^security.create_cross_cluster_api_key$" +
19-
"|^security.update_cross_cluster_api_key$" +
20-
"|^security.update_settings$" +
21-
"|^snapshot.repository_analyze$" +
22-
"|^watcher.get_settings$" +
23-
"|^watcher.update_settings",
24-
);
10+
const UNSUPPORTED_APIS = new RegExp("^_internal.*$");
2511

2612
export class JavaScriptExporter implements FormatExporter {
2713
_template: Handlebars.TemplateDelegate;

0 commit comments

Comments
 (0)