@@ -11,19 +11,81 @@ namespace JsonApiDotNetCore.Controllers;
11
11
public enum JsonApiEndpoints
12
12
{
13
13
None = 0 ,
14
+
15
+ /// <summary>
16
+ /// Endpoint to get a collection of primary resources.
17
+ /// </summary>
18
+ /// <example><code><![CDATA[GET /articles]]></code></example>
14
19
GetCollection = 1 ,
20
+
21
+ /// <summary>
22
+ /// Endpoint to get a single primary resource by ID.
23
+ /// </summary>
24
+ /// <example><code><![CDATA[GET /articles/1]]></code></example>
15
25
GetSingle = 1 << 1 ,
26
+
27
+ /// <summary>
28
+ /// Endpoint to get a secondary resource or collection of secondary resources.
29
+ /// </summary>
30
+ /// <example><code><![CDATA[GET /articles/1/author]]></code></example>
16
31
GetSecondary = 1 << 2 ,
32
+
33
+ /// <summary>
34
+ /// Endpoint to get a relationship value, which can be a <c>null</c>, a single object or a collection.
35
+ /// </summary>
36
+ /// <example><code><![CDATA[GET /articles/1/relationships/author]]></code></example>
37
+ /// <example><code><![CDATA[GET /articles/1/relationships/revisions]]></code></example>
17
38
GetRelationship = 1 << 3 ,
39
+
40
+ /// <summary>
41
+ /// Endpoint to creates a new resource with attributes, relationships or both.
42
+ /// </summary>
43
+ /// <example><code><![CDATA[POST /articles]]></code></example>
18
44
Post = 1 << 4 ,
45
+
46
+ /// <summary>
47
+ /// Endpoint to add resources to a to-many relationship.
48
+ /// </summary>
49
+ /// <example><code><![CDATA[POST /articles/1/revisions]]></code></example>
19
50
PostRelationship = 1 << 5 ,
51
+
52
+ /// <summary>
53
+ /// Endpoint to update the attributes and/or relationships of an existing resource.
54
+ /// </summary>
55
+ /// <example><code><![CDATA[PATCH /articles/1]]></code></example>
20
56
Patch = 1 << 6 ,
57
+
58
+ /// <summary>
59
+ /// Endpoint to perform a complete replacement of a relationship on an existing resource.
60
+ /// </summary>
61
+ /// <example><code><![CDATA[PATCH /articles/1/relationships/author]]></code></example>
62
+ /// <example><code><![CDATA[PATCH /articles/1/relationships/revisions]]></code></example>
21
63
PatchRelationship = 1 << 7 ,
64
+
65
+ /// <summary>
66
+ /// Endpoint to delete an existing resource.
67
+ /// </summary>
68
+ /// <example><code><![CDATA[DELETE /articles/1]]></code></example>
22
69
Delete = 1 << 8 ,
70
+
71
+ /// <summary>
72
+ /// Endpoint to remove resources from a to-many relationship.
73
+ /// </summary>
74
+ /// <example><code><![CDATA[DELETE /articles/1/relationships/revisions]]></code></example>
23
75
DeleteRelationship = 1 << 9 ,
24
76
77
+ /// <summary>
78
+ /// All read-only endpoints.
79
+ /// </summary>
25
80
Query = GetCollection | GetSingle | GetSecondary | GetRelationship ,
81
+
82
+ /// <summary>
83
+ /// All write endpoints.
84
+ /// </summary>
26
85
Command = Post | PostRelationship | Patch | PatchRelationship | Delete | DeleteRelationship ,
27
86
87
+ /// <summary>
88
+ /// All endpoints.
89
+ /// </summary>
28
90
All = Query | Command
29
91
}
0 commit comments