Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElasticsearchClient.msearchTemplate() throws MissingRequiredPropertyException #110

Closed
tony-hizzle opened this issue Jan 14, 2022 · 1 comment
Labels
Area: Specification Related to the API spec used to generate client code
Milestone

Comments

@tony-hizzle
Copy link

tony-hizzle commented Jan 14, 2022

When building the response for ElasticsearchClient.msearchTemplate(), ApiTypeHelper throws co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'MultiSearchItem.status'

        RequestItem requestItem = RequestItem.of(r -> r
                .header(h -> h.index("index_name"))
                .body(b -> b
                        .id("search_template_name")
                        .params(ImmutableMap.of("query_string", JsonData.of("mickey")))
                )
        );
        List<RequestItem> requests = Lists.newArrayList(requestItem);
        MsearchTemplateRequest multiSearchRequest = MsearchTemplateRequest.of(r -> r.searchTemplates(requests));
        MsearchTemplateResponse<Map> multiSearchResponse = elasticsearchClient.msearchTemplate(multiSearchRequest, Map.class);

@swallez
Copy link
Member

swallez commented Jan 25, 2022

The upstream API specification has been fixed in elastic/elasticsearch-specification#1320

The next pass of code generation will fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Specification Related to the API spec used to generate client code
Projects
None yet
Development

No branches or pull requests

2 participants