elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.65k stars 8.22k forks source link

[Console] Manual maintenance #97596

Open jloleysens opened 3 years ago

jloleysens commented 3 years ago

Summary

Currently, Console has a script that generates, and updates, endpoint definitions that are used. See packages/kbn-spec-to-console.

This uses ES's rest api spec as input to generate JSON files we use for autcomplete. However, because the rest-api-spec does not contain definitions for request bodies there is still a manual step that is required: adding the bodies to any requests that support them. These are manually scraped from ES docs usually.

This issue ties in with broader efforts to type Elasticsearch REST endpoint bodies. A lot of progress has been made here recently. For instance, the elasticsearch-js package now uses generated TS types that provide autcomplete for text editors that have TypeScript integration.

https://github.com/elastic/elasticsearch-js/blob/d2f77e994408afe1b9b64df397e7f4e761615821/api/types.d.ts#L1

We should endeavour remove all manual maintenance steps for Console and use this issue for tracking progress on this work. We should investigate the possibility of generating console endpoint definitions from the TS definitions.

Past related issues

elasticmachine commented 3 years ago

Pinging @elastic/es-ui (Team:Elasticsearch UI)

lcawl commented 1 year ago

It might be worth discussing with the clients team using https://github.com/elastic/elasticsearch-specification instead (or the open API specifications that have been generated from that content).

elasticmachine commented 1 month ago

Pinging @elastic/kibana-management (Team:Kibana Management)