@@ -7,20 +7,106 @@ namespace JsonApiDotNetCore.SourceGenerators;
77[ Flags ]
88public enum JsonApiEndpointsCopy
99{
10+ /// <summary>
11+ /// Represents none of the JSON:API endpoints.
12+ /// </summary>
1013 None = 0 ,
14+
15+ /// <summary>
16+ /// Represents the endpoint to get a collection of primary resources. Example: <code><![CDATA[
17+ /// GET /articles HTTP/1.1
18+ /// ]]></code>
19+ /// </summary>
1120 GetCollection = 1 ,
21+
22+ /// <summary>
23+ /// Represents the endpoint to get a single primary resource by ID. Example: <code><![CDATA[
24+ /// GET /articles/1 HTTP/1.1
25+ /// ]]></code>
26+ /// </summary>
1227 GetSingle = 1 << 1 ,
28+
29+ /// <summary>
30+ /// Represents the endpoint to get a secondary resource or collection of secondary resources. Example:
31+ /// <code><![CDATA[
32+ /// GET /articles/1/author HTTP/1.1
33+ /// ]]></code> Example: <code><![CDATA[
34+ /// GET /articles/1/revisions HTTP/1.1
35+ /// ]]></code>
36+ /// </summary>
1337 GetSecondary = 1 << 2 ,
38+
39+ /// <summary>
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>
46+ /// </summary>
1447 GetRelationship = 1 << 3 ,
48+
49+ /// <summary>
50+ /// Represents the endpoint to create a new resource with attributes, relationships or both. Example:
51+ /// <code><![CDATA[
52+ /// POST /articles HTTP/1.1
53+ /// ]]></code>
54+ /// </summary>
1555 Post = 1 << 4 ,
56+
57+ /// <summary>
58+ /// Represents the endpoint to add resources to a to-many relationship. Example: <code><![CDATA[
59+ /// POST /articles/1/revisions HTTP/1.1
60+ /// ]]></code>
61+ /// </summary>
1662 PostRelationship = 1 << 5 ,
63+
64+ /// <summary>
65+ /// Represents the endpoint to update the attributes and/or relationships of an existing resource. Example:
66+ /// <code><![CDATA[
67+ /// PATCH /articles/1
68+ /// ]]></code>
69+ /// </summary>
1770 Patch = 1 << 6 ,
71+
72+ /// <summary>
73+ /// Represents the endpoint to perform a complete replacement of a relationship on an existing resource. Example:
74+ /// <code><![CDATA[
75+ /// PATCH /articles/1/relationships/author HTTP/1.1
76+ /// ]]></code> Example:
77+ /// <code><![CDATA[
78+ /// PATCH /articles/1/relationships/revisions HTTP/1.1
79+ /// ]]></code>
80+ /// </summary>
1881 PatchRelationship = 1 << 7 ,
82+
83+ /// <summary>
84+ /// Represents the endpoint to delete an existing resource. Example: <code><![CDATA[
85+ /// DELETE /articles/1
86+ /// ]]></code>
87+ /// </summary>
1988 Delete = 1 << 8 ,
89+
90+ /// <summary>
91+ /// Represents the endpoint to remove resources from a to-many relationship. Example:
92+ /// <code><![CDATA[
93+ /// DELETE /articles/1/relationships/revisions
94+ /// ]]></code>
95+ /// </summary>
2096 DeleteRelationship = 1 << 9 ,
2197
98+ /// <summary>
99+ /// Represents the set of JSON:API endpoints to query resources and relationships.
100+ /// </summary>
22101 Query = GetCollection | GetSingle | GetSecondary | GetRelationship ,
102+
103+ /// <summary>
104+ /// Represents the set of JSON:API endpoints to change resources and relationships.
105+ /// </summary>
23106 Command = Post | PostRelationship | Patch | PatchRelationship | Delete | DeleteRelationship ,
24107
108+ /// <summary>
109+ /// Represents all of the JSON:API endpoints.
110+ /// </summary>
25111 All = Query | Command
26112}
0 commit comments