[Console] Add autocomplete for data streams (#214465)

Closes https://github.com/elastic/kibana/issues/212905

## Summary

This PR adds autocompletion for data-stream related endpoints.
Previously, it didn't work because the generated spec definitions that
were extracted from the Es specs repo were using the generic `{name}`
pattern instead of `{data_stream}`. In this PR, we override those
definition files and specify the correct pattern.

### How to test:

Test the following endpoints and make sure that data stream names are
suggested:

`GET _data_stream/{data_stream}/_stats`
`DELETE _data_stream/{data_stream}/_lifecycle`
`DELETE _data_stream/{data_stream}`
`GET _data_stream/{dataStream}/_lifecycle`
`GET _data_stream/{data_stream}`
`POST _data_stream/_migrate/{data_stream}`
`POST _data_stream/_promote/{data_stream}`
`PUT _data_stream/{data_stream}/_lifecycle`
This commit is contained in:
Elena Stoeva 2025-03-20 19:43:15 +00:00 committed by GitHub
parent 522f83fd25
commit f89e03c286
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,8 @@
{
"indices.data_streams_stats": {
"patterns": [
"_data_stream/_stats",
"_data_stream/{data_stream}/_stats"
]
}
}

View file

@ -0,0 +1,7 @@
{
"indices.delete_data_lifecycle": {
"patterns": [
"_data_stream/{data_stream}/_lifecycle"
]
}
}

View file

@ -0,0 +1,7 @@
{
"indices.delete_data_stream": {
"patterns": [
"_data_stream/{data_stream}"
]
}
}

View file

@ -0,0 +1,7 @@
{
"indices.get_data_lifecycle": {
"patterns": [
"_data_stream/{dataStream}/_lifecycle"
]
}
}

View file

@ -0,0 +1,8 @@
{
"indices.get_data_stream": {
"patterns": [
"_data_stream",
"_data_stream/{data_stream}"
]
}
}

View file

@ -0,0 +1,7 @@
{
"indices.migrate_to_data_stream": {
"patterns": [
"_data_stream/_migrate/{data_stream}"
]
}
}

View file

@ -0,0 +1,7 @@
{
"indices.promote_data_stream": {
"patterns": [
"_data_stream/_promote/{data_stream}"
]
}
}

View file

@ -0,0 +1,7 @@
{
"indices.put_data_lifecycle": {
"patterns": [
"_data_stream/{data_stream}/_lifecycle"
]
}
}