Skip to content

update examples with latest request-converter#5865

Merged
miguelgrinberg merged 2 commits intomainfrom
update-examples
Jan 14, 2026
Merged

update examples with latest request-converter#5865
miguelgrinberg merged 2 commits intomainfrom
update-examples

Conversation

@miguelgrinberg
Copy link
Contributor

This PR refreshes all the language code examples. To ensure that always the latest request-converter is used for this task, I've also added an npm update @elastic/request-converter to the make generate-language-examples task.

@github-actions
Copy link
Contributor

Following you can find the validation changes against the target branch for the APIs.

No changes detected.

You can validate these APIs yourself by using the make validate target.

@l-trotta
Copy link
Contributor

could we merge #5780 before? I've fixed some examples

@miguelgrinberg
Copy link
Contributor Author

This PR is now updated. I noticed that at some point the examples were re-generated with an older request converter, because a bunch of them are incorrect. These are all fixed in this PR as well.

const java = new JavaCaller({
minimumJavaVersion: 21,
jar: "path/to/converter/jar/java-es-request-converter-1.0-SNAPSHOT.jar",
jar: process.env.JAVA_ES_REQUEST_CONVERTER_JAR,
Copy link
Contributor Author

@miguelgrinberg miguelgrinberg Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we merge the Java PR in the request converter we will be able to remove the JavaCaller code and run the Java conversions in the same way as the other languages.

@l-trotta
Copy link
Contributor

@miguelgrinberg LGTM, but are we ready to merge the other PR?

@miguelgrinberg miguelgrinberg merged commit 5e0cd0e into main Jan 14, 2026
12 checks passed
@miguelgrinberg miguelgrinberg deleted the update-examples branch January 14, 2026 11:02
@github-actions
Copy link
Contributor

The backport to 9.2 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.2 9.2
# Navigate to the new working tree
cd .worktrees/backport-9.2
# Create a new branch
git switch --create backport-5865-to-9.2
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5e0cd0e8ce2c2132227dcebca0d777227419400f
# Push it to GitHub
git push --set-upstream origin backport-5865-to-9.2
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.2

Then, create a pull request where the base branch is 9.2 and the compare/head branch is backport-5865-to-9.2.

@github-actions
Copy link
Contributor

The backport to 9.3 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.3 9.3
# Navigate to the new working tree
cd .worktrees/backport-9.3
# Create a new branch
git switch --create backport-5865-to-9.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5e0cd0e8ce2c2132227dcebca0d777227419400f
# Push it to GitHub
git push --set-upstream origin backport-5865-to-9.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.3

Then, create a pull request where the base branch is 9.3 and the compare/head branch is backport-5865-to-9.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feedback]: Generated curl example for bulk is incorrect

3 participants