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