Skip to content

Commit edd8b74

Browse files
committed
Removed real app warning
1 parent 57d4db4 commit edd8b74

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

aspnetcore/web-api/jsonpatch.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ The JSON Patch standard:
2222

2323
* Is a standard format for describing changes to apply to a JSON document.
2424
* Is defined in [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902) and is widely used in RESTful APIs to perform partial updates to JSON resources.
25-
* Describes a sequence of operations such as `add`, `remove`, `replace`, `move`, `copy`, and `test` that modify a JSON document.
25+
* Describes a sequence of operations that modify a JSON document such as:
26+
27+
* `add`
28+
* `remove`
29+
* `replace`
30+
* `move`
31+
* `copy`
32+
* `test`
2633

2734
In web apps, JSON Patch is commonly used in a PATCH operation to perform partial updates of a resource. Rather than sending the entire resource for an update, clients can send a JSON Patch document containing only the changes. Patching reduces payload size and improves efficiency.
2835

@@ -64,7 +71,7 @@ Here's an example:
6471

6572
:::code language="csharp" source="~/web-api/jsonpatch/samples/3.x/api/Controllers/HomeController.cs" id="snippet_PatchAction" highlight="1,3,9":::
6673

67-
This code from the sample app works with the following `Customer` model:
74+
This code from the sample app works with the following `Customer` and `Order` models:
6875

6976
:::code language="csharp" source="~/web-api/jsonpatch/samples/6.x/api/Models/Customer.cs":::
7077

@@ -76,9 +83,6 @@ The sample action method:
7683
* Applies the patch.
7784
* Returns the result in the body of the response.
7885

79-
> [!NOTE]
80-
> In a real app, the data would typically be retrieved from a store such as a database. After applying the patch, the updated data would be saved back to the database.
81-
8286
### Model state
8387

8488
The preceding action method example calls an overload of <xref:Microsoft.AspNetCore.JsonPatch.JsonPatchDocument.ApplyTo(System.Object)> that takes model state as one of its parameters. With this option, you can get error messages in responses. The following example shows the body of a 400 Bad Request response for a `test` operation:

0 commit comments

Comments
 (0)