File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ JsonApiDotnetCore provides a framework for building [json:api](http://jsonapi.or
26
26
- [Filtering](#filtering)
27
27
- [Sorting](#sorting)
28
28
- [Meta](#meta)
29
+ - [Client Generated Ids](#client-generated-ids)
29
30
- [ Tests] ( #tests )
30
31
31
32
## Comprehensive Demo
@@ -342,6 +343,20 @@ public class Person : Identifiable<int>, IHasMeta
342
343
}
343
344
```
344
345
346
+ ### Client Generated Ids
347
+
348
+ By default, the server will respond with a ` 403 Forbidden ` HTTP Status Code if a ` POST ` request is
349
+ received with a client generated id. However, this can be allowed by setting the ` AllowClientGeneratedIds `
350
+ flag in the options:
351
+
352
+ ``` csharp
353
+ services .AddJsonApi <AppDbContext >(opt =>
354
+ {
355
+ opt .AllowClientGeneratedIds = true ;
356
+ // ..
357
+ });
358
+ ```
359
+
345
360
## Tests
346
361
347
362
I am using DotNetCoreDocs to generate sample requests and documentation.
You can’t perform that action at this time.
0 commit comments