Create Index using Index Template Json file

Hi is there any OpenSearch Java client equivalent to the following

InputStream input = this.getClass()
    .getResourceAsStream("some-index.json"); 

CreateIndexRequest req = CreateIndexRequest.of(b -> b
    .index("some-index")
    .withJson(input) 
);

Is there a withJson method in Java client

Can anyone help please?

I don’t think this exists. If you are interested in adding it as a feature, I expect it would be welcome. You could also add an issue here: Sign in to GitHub · GitHub