File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 11using com . sun . tools . javac . util ;
2+ using com . sun . xml . @internal . xsom . impl . parser ;
23using edu . stanford . nlp . ie . crf ;
34using edu . stanford . nlp . ling ;
45using edu . stanford . nlp . parser . lexparser ;
1011using edu . stanford . nlp . util ;
1112using java . util ;
1213using Microsoft . AspNetCore . Authentication . JwtBearer ;
14+ using Microsoft . AspNetCore . JsonPatch ;
15+ using Microsoft . AspNetCore . JsonPatch . Adapters ;
1316using Microsoft . AspNetCore . Mvc ;
1417using Microsoft . Extensions . Options ;
1518using Microsoft . IdentityModel . Tokens ;
299302. Produces < bool > ( StatusCodes . Status200OK )
300303. WithTags ( "Exposed" ) ;
301304
305+ app . MapPatch ( "/api/Patch" , ( [ FromBody ] JsonPatchDocument patchDoc ) =>
306+ {
307+ //patchDoc.ApplyTo(new object(), adapter);
308+ // Handle the patch document
309+ patchDoc . Operations . ForEach ( op =>
310+ {
311+ Console . WriteLine ( $ "Operation: { op . op } , Path: { op . path } , Value: { op . value } ") ;
312+ } ) ;
313+ return Results . Accepted ( ) ;
314+ } )
315+ . Produces ( StatusCodes . Status202Accepted )
316+ . WithTags ( "JsonPatch" ) ;
317+
302318app . MapControllers ( ) . RequireCors ( "MyPolicy" ) ;
303319
304320app . Run ( ) ;
Original file line number Diff line number Diff line change 4747
4848 <ItemGroup >
4949 <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 8.0.15" />
50+ <PackageReference Include =" Microsoft.AspNetCore.JsonPatch" Version =" 8.0.22" />
5051 <PackageReference Include =" Microsoft.AspNetCore.OData" Version =" 8.0.12" />
5152 <PackageReference Include =" Microsoft.AspNetCore.OpenApi" Version =" 8.0.15" />
5253 <PackageReference Include =" Microsoft.IdentityModel.JsonWebTokens" Version =" 7.7.1" />
You can’t perform that action at this time.
0 commit comments