-
Notifications
You must be signed in to change notification settings - Fork 254
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
Allow requests to be serialized as nothing instead of an empty object #926
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fixes #924 |
l-trotta
approved these changes
Jan 23, 2025
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.x 8.x
# Navigate to the new working tree
cd .worktrees/backport-8.x
# Create a new branch
git switch --create backport-926-to-8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 d78f01e99bbc3048f2d0a5e68165e30f1163352c
# Push it to GitHub
git push --set-upstream origin backport-926-to-8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.x Then, create a pull request where the |
swallez
added a commit
that referenced
this pull request
Jan 23, 2025
swallez
added a commit
that referenced
this pull request
Jan 23, 2025
l-trotta
pushed a commit
that referenced
this pull request
Jan 23, 2025
swallez
added a commit
that referenced
this pull request
Jan 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow requests that have all-optional properties to be serialized as an empty body (zero bytes) instead of an empty object (
{}
)Some endpoints (e.g.
/_validate/query
) require this behavior and reject requests that have an empty object body.This is achieved by wrapping the body accessor in endpoint definitions using
EndpointBase.nonEmptyJsonObject(bodyGetter)
. This will be added to the relevant endpoints in the code generator.