test is useful in some scenario. Taking HTTP patch as example, it can be used for checking consistency when going with HTTP PATCH method.
If test operation is supported, we can simply include a consistency stamp as the first operation. if test failed no patch(update) action will take effect.
This can make the patch being more atomic, otherwise we have to implement consistency checking separately( such as an ugly request query parameter.)
// http request payload
[
{op:'test', path:'/consistencyStamp', value:'some value for stamp' },
{op:'replace', path:'/enabled',value:'true'}
// ... //other operations
]
Thank you, guys
Since JsonPatch is now token as the first-class support in asp.net core, and test operation it's useful, It should be implemented integrally with the standard.
Microsoft is great while making .net core open-source, and all of guys like you is cool to do these jobs.
come on, It can be more perfect. and many thanks to you man.
NOT SUPPORTED NOW I found that the
test
operation is not supported till now. ( JsonPatch, Version=1.1.0.0 )A part of standard
Refer to rfc6902 section-4.6 from the IETF,
test
is one of the operations that is specified.It's useful
test
is useful in some scenario. Taking HTTP patch as example, it can be used for checking consistency when going withHTTP PATCH
method.If
test
operation is supported, we can simply include a consistency stamp as the first operation. if test failed no patch(update) action will take effect.This can make the patch being more
atomic
, otherwise we have to implement consistency checking separately( such as an ugly request query parameter.)Thank you, guys
Since
JsonPatch
is now token as the first-class support in asp.net core, andtest
operation it's useful, It should be implemented integrally with the standard. Microsoft is great while making .net core open-source, and all of guys like you is cool to do these jobs. come on, It can be more perfect. and many thanks to you man.