-
Notifications
You must be signed in to change notification settings - Fork 114
Fix requestBodyRequired #5465
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
Fix requestBodyRequired #5465
Conversation
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 |
|
||
// validate body | ||
if (bodyMember != null) { | ||
mapping.requestBodyRequired = !(bodyMember as PropertySignature).hasQuestionToken() |
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.
We check if the body has a question token, that is, if it is written as body?: ...
.
This was already applied in the case of bodyValue
below (line 319/320), but this branch was missed, which means the default from rest-api-spec, "required: false," was taking over.
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.19 8.19
# Navigate to the new working tree
cd .worktrees/backport-8.19
# Create a new branch
git switch --create backport-5465-to-8.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 62d200f5597fbf3529686f7ae7063d6b0a77f1cb
# Push it to GitHub
git push --set-upstream origin backport-5465-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 |
(cherry picked from commit 62d200f)
(cherry picked from commit 62d200f) # Conflicts: # output/openapi/elasticsearch-openapi.json # output/openapi/elasticsearch-serverless-openapi.json # output/schema/schema.json
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 62d200f) Co-authored-by: Quentin Pradet <[email protected]>
It was incorrectly set to false for 68 APIs.