You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per PR #385, there has been a change in PatchNamespacedCustomObjectWithHttpMessagesAsync method to use JsonPatch as the PatchType, instead of MergePatch which was the behavior before.
Due to this in our existing implementation, we are hitting the below error while patching a namespaced custom object:
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"json: cannot unmarshal object into Go value of type jsonpatch.Patch","reason":"BadRequest","code":400}.
The client expects that PatchType must be JsonPatch now, but in our scenario we need the support for MergePatch. Would it be possible to revert to the existing behavior, prior to #385? Or, can PatchType be added as an input for these methods?
The text was updated successfully, but these errors were encountered:
Yeah, this is unfortunate, I would have suggested passing in the Content-Type in the custom headers parameter, but looking at the generated code, the content-type is overridden if if it is passed in.
That seems like a bug in AutoRest (the code generator in question) since at this point you can't customize the content-type. I'll follow up with that project and see if we can fix things.
@brendandburns any update on AutoRest project making this fix? We were also looking at picking up #493 (throw on 401 error) when its available but looks like at that point we also need to have this issue resolved so that we can pick the latest nuget.
I checked w/ the AutoRest team, it looks like a fix may not be forthcoming quickly, so I will see about manually editing this file to revert to the default behavior while we look to see if there is a more permanent fix.
As per PR #385, there has been a change in PatchNamespacedCustomObjectWithHttpMessagesAsync method to use JsonPatch as the PatchType, instead of MergePatch which was the behavior before.
Due to this in our existing implementation, we are hitting the below error while patching a namespaced custom object:
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"json: cannot unmarshal object into Go value of type jsonpatch.Patch","reason":"BadRequest","code":400}.
The client expects that PatchType must be JsonPatch now, but in our scenario we need the support for MergePatch. Would it be possible to revert to the existing behavior, prior to #385? Or, can PatchType be added as an input for these methods?
The text was updated successfully, but these errors were encountered: