Open abdollahkahne opened 2 years ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
I am not sure which Library is responsible for this issue and I am sorry if it is not related to this repo. I am trying to implement a Patch Request API using Asp.Net Core API 5.0 and so I have a parameter in my Controller Action which Takes
JsonPatchDocument<T>
. As I tried it I noticed that we should have three stage of verification for this model including: 0- Validation ofJsonPatchDocument
according to Rest Standard (for example it should be an array! its element have standard shape includingop
andpath
and other constraints). This Validation should done after binding model and it do not happen now 1- Validation ofJsonPatchDocument
according to our Entity Type (For example does selectedpath
existed in our entity) 2- Validation of ResultedT
model from applying requested patch (for example field is email type and other verification attributes added to modelT
.From the above list the validations 1 and 2 happens and is okay but validation 0 does not handle which I think it should be an step right after model binding. For example when sending the following patch request I get 500 status code error. The action responsible for this code is as below:
`
` I have added the following library for handling JsonPatchDocument
Microsoft.AspNetCore.JsonPatch` And I appreciate if checking the request against REST Standard for patch request done some where to prevent 500 status code error. My Response My logs: and the related repository to test this: https://github.com/CodeMazeBlog/httpclient-aspnetcore/tree/main/starter/CompanyEmployees