elasticsearch-java icon indicating copy to clipboard operation
elasticsearch-java copied to clipboard

PutIndexTemplateRequest and PutComponentTemplateRequest lack allow_auto_create field

Open ztyzbb opened this issue 1 year ago • 1 comments

Description

Both PutIndexTemplateRequest and PutComponentTemplateRequest lacks allow_auto_create field. Create or update component template API Create or update index template API Index template API's doc didn't list this field but it just works when you PUT it. Hope can backport to 7.17, thank you!

ztyzbb avatar May 10 '23 06:05 ztyzbb

Hello, thank you for reporting this! While it looks like PutComponentTemplateRequest was already fixed with this PR , PutIndexTemplateRequest is still missing allow_auto_create; I'll have to investigate this a bit more since it's missing from the documentation as well. If it's actually an accepted parameter then we'll fix the API specification and regenerate the java code from it. Thank you!

l-trotta avatar Mar 28 '24 15:03 l-trotta

So, after investigating it turns out there were some mistakes in the documentation, PutComponentTemplateRequest actually doesn't allow allow_auto_create, while PutIndexTemplateRequest does, and there are also other fields with similar mistakes. This specification PR fixes those mistakes for the clients, the docs will be fixed in the future.

l-trotta avatar Apr 18 '24 15:04 l-trotta