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
This converter only support one method argument, isnt it? see body paramater {"name": "Post 1", "body": "This is a blog post"}
instead if you use:
{"post": {"name": "Post 1", "body": "This is a blog post"}}
you could attach more than one parameter i.e
{
"post": {"name": "Post 1", "body": "This is a blog post"},
"anotherparam": {"text": "the text"}
}
also you could have a configuration parameter to enable if request parameter conversion is wrapped by a root tag
The text was updated successfully, but these errors were encountered:
Indeed, I do see the use case for configuring the root parameter name to allow deserialization of request bodies like {"post": {"name" : "post 1"}}, but I'm not sure about allowing multiple roots like your second example, as this seems to go against REST principles of modifying a single resource.
I believe you could write a custom deserialization handler for jms serializer to handle the root tag bit. Another less ideal alternative/workaround could be to use a wrapper object for deserialization:
This converter only support one method argument, isnt it? see body paramater {"name": "Post 1", "body": "This is a blog post"}
instead if you use:
{"post": {"name": "Post 1", "body": "This is a blog post"}}
you could attach more than one parameter i.e
{
"post": {"name": "Post 1", "body": "This is a blog post"},
"anotherparam": {"text": "the text"}
}
also you could have a configuration parameter to enable if request parameter conversion is wrapped by a root tag
The text was updated successfully, but these errors were encountered: