File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 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
2626 - [Filtering](#filtering)
2727 - [Sorting](#sorting)
2828 - [Meta](#meta)
29+ - [Client Generated Ids](#client-generated-ids)
2930- [ Tests] ( #tests )
3031
3132## Comprehensive Demo
@@ -342,6 +343,20 @@ public class Person : Identifiable<int>, IHasMeta
342343}
343344```
344345
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+
345360## Tests
346361
347362I am using DotNetCoreDocs to generate sample requests and documentation.
You can’t perform that action at this time.
0 commit comments