fix: respect requestBody.required in strict server#1936
Conversation
|
any update on this PR? thanks! |
1ad6f36 to
6225e75
Compare
Kusari Analysis ResultsAnalysis for commit: 6225e75, performed at: 2025-08-01T08:12:45Z • • Recommendation✅ PROCEED with this Pull Request Summary✅ No Flagged Issues Detected All values appear to be within acceptable risk parameters. No pinned version dependency changes, code issues or exposed secrets detected! Found this helpful? Give it a 👍 or 👎 reaction! |
|
We also need this fix to support |
|
Thank you for submitting this PR, @dbarrosop — but we need to close it because the same fix (treating Thanks for the contribution. |
I noticed that
requestBody.requiredwasn't being respected and requests without a body were failing with an[EOF]error even though required was set to false.This PR is a tentative fix to this issue. It certainly works as my API now behaves according to the spec and it fails without a body only if
required: trueI was wondering if we should also do:
That would mean that if the body isn't present we would correctly send a nil object down to the server implementation but I am concerned that would lead to lots of panics in existing services for users that hadn't been paying attention to the fact that
required: falseis the default behavior when not set.Thoughts?