-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Check that client methods match API defined in the REST spec #31825
Changes from 2 commits
5ec0f4c
33d86a6
bfc28a2
4e035aa
16ec7a2
fba6b12
0dee911
e0d6635
7086d08
72e9fa4
dc3c55e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,7 +173,7 @@ public void putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions | |
* @return the response | ||
* @throws IOException in case there is a problem sending the request or parsing back the response | ||
*/ | ||
public GetMappingsResponse getMappings(GetMappingsRequest getMappingsRequest, RequestOptions options) throws IOException { | ||
public GetMappingsResponse getMapping(GetMappingsRequest getMappingsRequest, RequestOptions options) throws IOException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All these changes are breaking. I guess we should deprecate the old methods in 6.x and have the test ignore those? It is pretty annoying that we just released some of these (some haven't been released yet so we are lucky there) and we already need to rename them... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree we should deprecate the old names and remove in 7.0. Certainly annoying but we really are trying to be better about breaking the client. |
||
return restHighLevelClient.performRequestAndParseEntity(getMappingsRequest, RequestConverters::getMappings, options, | ||
GetMappingsResponse::fromXContent, emptySet()); | ||
} | ||
|
@@ -186,8 +186,8 @@ public GetMappingsResponse getMappings(GetMappingsRequest getMappingsRequest, Re | |
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized | ||
* @param listener the listener to be notified upon request completion | ||
*/ | ||
public void getMappingsAsync(GetMappingsRequest getMappingsRequest, RequestOptions options, | ||
ActionListener<GetMappingsResponse> listener) { | ||
public void getMappingAsync(GetMappingsRequest getMappingsRequest, RequestOptions options, | ||
ActionListener<GetMappingsResponse> listener) { | ||
restHighLevelClient.performRequestAsyncAndParseEntity(getMappingsRequest, RequestConverters::getMappings, options, | ||
GetMappingsResponse::fromXContent, listener, emptySet()); | ||
} | ||
|
@@ -446,7 +446,7 @@ public void getSettingsAsync(GetSettingsRequest getSettingsRequest, RequestOptio | |
* @return the response | ||
* @throws IOException in case there is a problem sending the request or parsing back the response | ||
*/ | ||
public ForceMergeResponse forceMerge(ForceMergeRequest forceMergeRequest, RequestOptions options) throws IOException { | ||
public ForceMergeResponse forcemerge(ForceMergeRequest forceMergeRequest, RequestOptions options) throws IOException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ew |
||
return restHighLevelClient.performRequestAndParseEntity(forceMergeRequest, RequestConverters::forceMerge, options, | ||
ForceMergeResponse::fromXContent, emptySet()); | ||
} | ||
|
@@ -459,7 +459,7 @@ public ForceMergeResponse forceMerge(ForceMergeRequest forceMergeRequest, Reques | |
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized | ||
* @param listener the listener to be notified upon request completion | ||
*/ | ||
public void forceMergeAsync(ForceMergeRequest forceMergeRequest, RequestOptions options, ActionListener<ForceMergeResponse> listener) { | ||
public void forcemergeAsync(ForceMergeRequest forceMergeRequest, RequestOptions options, ActionListener<ForceMergeResponse> listener) { | ||
restHighLevelClient.performRequestAsyncAndParseEntity(forceMergeRequest, RequestConverters::forceMerge, options, | ||
ForceMergeResponse::fromXContent, listener, emptySet()); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these build changes are temporary, I just hacked to make the new test work. The new test needs the spec in its classpath, yet it is not an integ test. Suggestions are welcome on how to improve this and make this cleaner.