-
Notifications
You must be signed in to change notification settings - Fork 73
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
Cleanup enum values, allow using identifier+value as an alternative to @codegen_name #2379
Conversation
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.
LGTM
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.
ML changes LGTM
Thanks for updating
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
The backport to
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.12 8.12
# Navigate to the new working tree
cd .worktrees/backport-8.12
# Create a new branch
git switch --create backport-2379-to-8.12
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7e140693f2bbd392b95f54f2cd2b0c0895db2e5d
# Push it to GitHub
git push --set-upstream origin backport-2379-to-8.12
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.12 Then, create a pull request where the |
This PR allows using the standard TypeScript enum syntax to define custom identifiers for enum members, in addition to the existing
@codegen_name
jsdoc tag.Also cleans up the numeric values that existed on some enums for historical reasons (they were required in the early days of the API spec compiler) and refine the docs related to defining enums in the API spec.
Concretely, both definitions below are now equivalent (previously the
z-score
value was discarded, leading to a wrong declaration):and
Validation: compiling the API spec after these changes only produces
specLocation
changes inoutput/schema.json
becaused of the removed jsdoc tags.