You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/JsonApiDotNetCore/Configuration/IJsonApiOptions.cs
+30-14
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
usingSystem.Data;
2
2
usingSystem.Text.Json;
3
+
usingJetBrains.Annotations;
3
4
usingJsonApiDotNetCore.Resources.Annotations;
4
5
usingJsonApiDotNetCore.Serialization.Objects;
5
6
@@ -21,37 +22,40 @@ public interface IJsonApiOptions
21
22
string?Namespace{get;}
22
23
23
24
/// <summary>
24
-
/// Specifies the default set of allowed capabilities on JSON:API attributes. Defaults to <see cref="AttrCapabilities.All" />.
25
+
/// Specifies the default set of allowed capabilities on JSON:API attributes. Defaults to <see cref="AttrCapabilities.All" />. This setting can be
26
+
/// overruled per attribute using <see cref="AttrAttribute.Capabilities" />.
25
27
/// </summary>
26
28
AttrCapabilitiesDefaultAttrCapabilities{get;}
27
29
28
30
/// <summary>
29
-
/// Specifies the default set of allowed capabilities on JSON:API to-one relationships. Defaults to <see cref="HasOneCapabilities.All" />.
31
+
/// Specifies the default set of allowed capabilities on JSON:API to-one relationships. Defaults to <see cref="HasOneCapabilities.All" />. This setting
32
+
/// can be overruled per relationship using <see cref="HasOneAttribute.Capabilities" />.
30
33
/// </summary>
31
34
HasOneCapabilitiesDefaultHasOneCapabilities{get;}
32
35
33
36
/// <summary>
34
-
/// Specifies the default set of allowed capabilities on JSON:API to-many relationships. Defaults to <see cref="HasManyCapabilities.All" />.
37
+
/// Specifies the default set of allowed capabilities on JSON:API to-many relationships. Defaults to <see cref="HasManyCapabilities.All" />. This setting
38
+
/// can be overruled per relationship using <see cref="HasManyAttribute.Capabilities" />.
/// Indicates whether responses should contain a jsonapi object that contains the highest JSON:API version supported. False by default.
43
+
/// Whether to include a 'jsonapi' object in responses, which contains the highest JSON:API version supported. <c>false</c> by default.
40
44
/// </summary>
41
45
boolIncludeJsonApiVersion{get;}
42
46
43
47
/// <summary>
44
-
/// Whether or not <see cref="Exception" /> stack traces should be included in <see cref="ErrorObject.Meta" />. False by default.
48
+
/// Whether to include <see cref="Exception" /> stack traces in <see cref="ErrorObject.Meta" /> responses. <c>false</c> by default.
45
49
/// </summary>
46
50
boolIncludeExceptionStackTraceInErrors{get;}
47
51
48
52
/// <summary>
49
-
/// Whether or not the request body should be included in <see cref="Document.Meta" /> when it is invalid. False by default.
53
+
/// Whether to include the request body in <see cref="Document.Meta" /> responses when it is invalid. <c>false</c> by default.
50
54
/// </summary>
51
55
boolIncludeRequestBodyInErrors{get;}
52
56
53
57
/// <summary>
54
-
/// Use relative links for all resources. False by default.
58
+
/// Whether to use relative links for all resources. <c>false</c> by default.
55
59
/// </summary>
56
60
/// <example>
57
61
/// <code><![CDATA[
@@ -94,7 +98,7 @@ public interface IJsonApiOptions
94
98
LinkTypesRelationshipLinks{get;}
95
99
96
100
/// <summary>
97
-
/// Whether or not the total resource count should be included in top-level meta objects. This requires an additional database query. False by default.
101
+
/// Whether to include the total resource count in top-level meta objects. This requires an additional database query. <c>false</c> by default.
98
102
/// </summary>
99
103
boolIncludeTotalResourceCount{get;}
100
104
@@ -114,28 +118,40 @@ public interface IJsonApiOptions
114
118
PageNumber?MaximumPageNumber{get;}
115
119
116
120
/// <summary>
117
-
/// Whether or not to enable ASP.NET ModelState validation. True by default.
121
+
/// Whether ASP.NET ModelState validation is enabled. <c>true</c> by default.
118
122
/// </summary>
119
123
boolValidateModelState{get;}
120
124
121
125
/// <summary>
122
-
/// Whether or not clients can provide IDs when creating resources. When not allowed, a 403 Forbidden response is returned if a client attempts to create
123
-
/// a resource with a defined ID. False by default.
126
+
/// Whether clients are allowed or required to provide IDs when creating resources. <see cref="ClientIdGenerationMode.Forbidden" /> by default. This
127
+
/// setting can be overruled per resource type using <see cref="ResourceAttribute.ClientIdGeneration" />.
124
128
/// </summary>
129
+
ClientIdGenerationModeClientIdGeneration{get;}
130
+
131
+
/// <summary>
132
+
/// Whether clients can provide IDs when creating resources. When not allowed, a 403 Forbidden response is returned if a client attempts to create a
133
+
/// resource with a defined ID. <c>false</c> by default.
134
+
/// </summary>
135
+
/// <remarks>
136
+
/// Setting this to <c>true</c> corresponds to <see cref="ClientIdGenerationMode.Allowed" />, while <c>false</c> corresponds to
0 commit comments