Description
Elastic.Clients.Elasticsearch version: 8.15.8
Elasticsearch version:8.15.1
.NET runtime version:8.0
Operating system version: Windows 11
Description of the problem including expected versus actual behavior:
CreateApiKeyRequest, has RoleDescriptors, witch has IndicesPrivileges with Names
Names are Indicies. But when setting Indices to "" the "" is converted to "_all". But _all is not supported by the elastic search server.
It is the same issue with GetApiKeyResponse, where the Name is "*" and is then converted to _all when deserilized:
Expected behavior
"*" is serialized as {"name":"ElasticKeyName","role_descriptors":{"rolename":{"cluster":["manage_pipeline","manage"],"indices":[{"names":"_all","privileges":["all"]}]}}}
I would expected it to be
"" is serialized as {"name":"ElasticKeyName","role_descriptors":{"rolename":{"cluster":["manage_pipeline","manage"],"indices":[{"names":"","privileges":["all"]}]}}}