Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

swallez
Copy link
Member

@swallez swallez commented Jan 21, 2025

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.

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.

1 participant