This repository was archived by the owner on Nov 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ RFC : XXXX
3
+ Author : Kyle Fuller
4
+ Status : Draft
5
+ Created : 2015-09-21
6
+ Last Modified : 2015-09-21
7
+ ---
8
+
9
+ # API Blueprint RFC XXXX: Affordances
10
+
11
+ ## Table of Contents
12
+
13
+ - [ Abstract] ( #abstract )
14
+ - [ Rationale] ( #rationale )
15
+ - [ Example] ( #example )
16
+
17
+ ## Abstract
18
+
19
+ This RFC proposes that you can define affordances (link relations) that an API
20
+ resource or action provides.
21
+
22
+ ## Rationale
23
+
24
+ This RFC proposes adding an ` Affordances ` section into API Blueprint that
25
+ sits under a resource or action providing the affodances that it provides.
26
+
27
+ ### Example
28
+
29
+ To describe affordances from a ` Question ` resource to two other resources, we
30
+ can describe them within the affordances section as follows:
31
+
32
+ ``` apib
33
+ ## Question [/question/{id}]
34
+
35
+ + Parameters
36
+ + id: 1
37
+
38
+ + Affordances
39
+ + `create_comment` (Comments[create])
40
+ + `author` (User)
41
+ ```
42
+
43
+ Where ` Comment ` is a resource named ` Comment ` that has a ` create ` relation
44
+ identifier and User is another resource.
45
+
46
+ ``` apib
47
+ ## Comments [/comments]
48
+ ### Create Comment [PUT ]
49
+ + Relation: create
50
+
51
+ ## User [/user/{username}]
52
+
53
+ + Parameters
54
+ + username
55
+ ```
56
+
You can’t perform that action at this time.
0 commit comments