Skip to content

Conversation

@Anaethelion
Copy link
Contributor

This adds a @codegen_exclude decorator only for requests that will translate into an optional boolean in the metamodel's Endpoint.

This also comes with a new eslint rule to avoid using the decorator outside of requests.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

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.

Copy link
Contributor

@MattDevy MattDevy left a comment

Choose a reason for hiding this comment

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

LGTM!

Added a very minor suggestion that's a little outside the scope of this change

Edit to add: ignore previous suggestion, I forgot Javascript automatically falls through unless you use break :D

Copy link
Member

@JoshMock JoshMock left a comment

Choose a reason for hiding this comment

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

LGTM!

Should we add a tracking conformance issue to ensure all clients respect the new decorator?

@Anaethelion
Copy link
Contributor Author

LGTM!

Should we add a tracking conformance issue to ensure all clients respect the new decorator?

That will be the topic of a future discussion!

@Anaethelion Anaethelion merged commit 9e6143b into main Dec 9, 2025
12 checks passed
@Anaethelion Anaethelion deleted the codegen_exclude_decorator branch December 9, 2025 09:37
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

The backport to 8.19 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-8.19 8.19
# Navigate to the new working tree
cd .worktrees/backport-8.19
# Create a new branch
git switch --create backport-5800-to-8.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9e6143bdb6cf3824a3867fd4ec881b043a893862
# Push it to GitHub
git push --set-upstream origin backport-5800-to-8.19
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.19

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

The backport to 9.1 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.1 9.1
# Navigate to the new working tree
cd .worktrees/backport-9.1
# Create a new branch
git switch --create backport-5800-to-9.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9e6143bdb6cf3824a3867fd4ec881b043a893862
# Push it to GitHub
git push --set-upstream origin backport-5800-to-9.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.1

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

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-5800-to-9.2
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9e6143bdb6cf3824a3867fd4ec881b043a893862
# Push it to GitHub
git push --set-upstream origin backport-5800-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-5800-to-9.2.

@MattDevy
Copy link
Contributor

MattDevy commented Dec 9, 2025

LGTM!

Should we add a tracking conformance issue to ensure all clients respect the new decorator?

Done for Go generator :) https://github.com/elastic/elastic-client-generator-go/commit/575420ee6db8ebdc05b1aa45ab215ed54d4a05cd

l-trotta added a commit that referenced this pull request Dec 9, 2025
* Add codegenExclude tag to mark endpoints for exclusion from client code generation

* Add ESLint rule to restrict @codegen_exclude usage to Request.ts files

* Add @codegen_exclude tag to internal request interfaces

* Add output to the mix

* Fix linter

* Add codegenExclude property to typescript-generator's metamodel
l-trotta added a commit that referenced this pull request Dec 9, 2025
* Add codegenExclude tag to mark endpoints for exclusion from client code generation

* Add ESLint rule to restrict @codegen_exclude usage to Request.ts files

* Add @codegen_exclude tag to internal request interfaces

* Add output to the mix

* Fix linter

* Add codegenExclude property to typescript-generator's metamodel
@l-trotta l-trotta mentioned this pull request Dec 9, 2025
@l-trotta l-trotta mentioned this pull request Dec 9, 2025
l-trotta added a commit that referenced this pull request Dec 9, 2025
* Codegen exclude decorator (#5800)

* Add codegenExclude tag to mark endpoints for exclusion from client code generation

* Add ESLint rule to restrict @codegen_exclude usage to Request.ts files

* Add @codegen_exclude tag to internal request interfaces

* Add output to the mix

* Fix linter

* Add codegenExclude property to typescript-generator's metamodel

* fix merge
l-trotta added a commit that referenced this pull request Dec 9, 2025
* Codegen exclude decorator (#5800)

* Add codegenExclude tag to mark endpoints for exclusion from client code generation

* Add ESLint rule to restrict @codegen_exclude usage to Request.ts files

* Add @codegen_exclude tag to internal request interfaces

* Add output to the mix

* Fix linter

* Add codegenExclude property to typescript-generator's metamodel

* fix merge
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.

4 participants