openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Fix nullable & required properties in multipart bodies

Open dbanty opened this issue 1 year ago • 1 comments

WIP Fix for #926

dbanty avatar Mar 09 '24 19:03 dbanty

@dbanty Anything else I can help test with this MR?

johnthagen avatar May 07 '24 12:05 johnthagen

@johnthagen I totally lost track of this PR, sorry! I think that the logic is now roughly the same as what it was in 0.16 and prior. However, I'm realizing that encoding None as a string is almost definitely the wrong behavior. I haven't actually used multipart in many years at this point—are you aware of a convention for sending a literal null? Should we just be omitting the value like we do for query params?

dbanty avatar May 18 '24 18:05 dbanty

Since this version is strictly better than what's before it (and I think really close to 0.16), I'm going to merge as-is. We can address passing nulls via multipart once someone reports a real-world need for it.

dbanty avatar May 18 '24 19:05 dbanty

@dbanty Thanks and I think your plan sounds great! I'll also test the 0.20 release and report back to you.

johnthagen avatar May 18 '24 22:05 johnthagen

@dbanty Confirmed that 0.20.0 resolved #926 and everything else appears to be working fine with it too. Thanks!

johnthagen avatar May 20 '24 13:05 johnthagen