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
Due to this check and potentially missing implementation, a mix of JSON/XML bodies along with other directives is not possible.
This blocks common REST calls, for example creating/updating entities (POST /entity/:id/PUT /entity/:id), where you wish to decode both the URL param :id and the incoming JSON body into a single struct.
The text was updated successfully, but these errors were encountered:
Hi @snicol , actually httpin does support mixing body input and param input currently. We can use the body directive along with other param input related directives. Let's see an example:
typeUpdateUserInputstruct {
IDstring`in:"path=id"`// NOTE: register a path directive before usingPayloadstruct {
Displaystring`json:"display"`Emailstring`json:"email"`IsAdminbool`json:"is_admin"`
} `in:"body=json"`
}
So, the problem here is that the Body Annotations don't support a mix. I think it's okay now, I will update the docs and make it more clear. Thanks for the report :)
Due to this check and potentially missing implementation, a mix of JSON/XML bodies along with other directives is not possible.
This blocks common REST calls, for example creating/updating entities (
POST /entity/:id
/PUT /entity/:id
), where you wish to decode both the URL param:id
and the incoming JSON body into a single struct.The text was updated successfully, but these errors were encountered: