@@ -24,55 +24,55 @@ An example of Flask-COMBO-JSONAPI API looks like this:
24
24
25
25
This example provides this api:
26
26
27
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
28
- | url | method | endpoint | action |
29
- +==========================================+========+==================+=======================================================+
30
- | /persons | GET | person_list | Retrieve a collection of persons |
31
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
32
- | /persons | POST | person_list | Create a person |
33
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
34
- | /persons/<int:id> | GET | person_detail | Retrieve details of a person |
35
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
36
- | /persons/<int:id> | PATCH | person_detail | Update a person |
37
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
38
- | /persons/<int:id> | DELETE | person_detail | Delete a person |
39
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
40
- | /persons/<int:id>/computers | GET | computer_list | Retrieve a collection computers related to a person |
41
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
42
- | /persons/<int:id>/computers | POST | computer_list | Create a computer related to a person |
43
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
44
- | /persons/<int:id>/relationship /computers | GET | person_computers | Retrieve relationships between a person and computers |
45
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
46
- | /persons/<int:id>/relationship /computers | POST | person_computers | Create relationships between a person and computers |
47
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
48
- | /persons/<int:id>/relationship /computers | PATCH | person_computers | Update relationships between a person and computers |
49
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
50
- | /persons/<int:id>/relationship /computers | DELETE | person_computers | Delete relationships between a person and computers |
51
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
52
- | /computers | GET | computer_list | Retrieve a collection of computers |
53
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
54
- | /computers | POST | computer_list | Create a computer |
55
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
56
- | /computers/<int:id> | GET | computer_detail | Retrieve details of a computer |
57
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
58
- | /computers/<int:id> | PATCH | computer_detail | Update a computer |
59
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
60
- | /computers/<int:id> | DELETE | computer_detail | Delete a computer |
61
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
62
- | /computers/<int:id>/owner | GET | person_detail | Retrieve details of the owner of a computer |
63
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
64
- | /computers/<int:id>/owner | PATCH | person_detail | Update the owner of a computer |
65
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
66
- | /computers/<int:id>/owner | DELETE | person_detail | Delete the owner of a computer |
67
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
68
- | /computers/<int:id>/relationship /owner | GET | person_computers | Retrieve relationships between a person and computers |
69
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
70
- | /computers/<int:id>/relationship /owner | POST | person_computers | Create relationships between a person and computers |
71
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
72
- | /computers/<int:id>/relationship /owner | PATCH | person_computers | Update relationships between a person and computers |
73
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
74
- | /computers/<int:id>/relationship /owner | DELETE | person_computers | Delete relationships between a person and computers |
75
- +------------------------------------------+--------+------------------+-------------------------------------------------------+
27
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
28
+ | url | method | endpoint | action |
29
+ +=========================================== +========+==================+=======================================================+
30
+ | /persons | GET | person_list | Retrieve a collection of persons |
31
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
32
+ | /persons | POST | person_list | Create a person |
33
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
34
+ | /persons/<int:id> | GET | person_detail | Retrieve details of a person |
35
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
36
+ | /persons/<int:id> | PATCH | person_detail | Update a person |
37
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
38
+ | /persons/<int:id> | DELETE | person_detail | Delete a person |
39
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
40
+ | /persons/<int:id>/computers | GET | computer_list | Retrieve a collection computers related to a person |
41
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
42
+ | /persons/<int:id>/computers | POST | computer_list | Create a computer related to a person |
43
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
44
+ | /persons/<int:id>/relationships /computers | GET | person_computers | Retrieve relationships between a person and computers |
45
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
46
+ | /persons/<int:id>/relationships /computers | POST | person_computers | Create relationships between a person and computers |
47
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
48
+ | /persons/<int:id>/relationships /computers | PATCH | person_computers | Update relationships between a person and computers |
49
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
50
+ | /persons/<int:id>/relationships /computers | DELETE | person_computers | Delete relationships between a person and computers |
51
+ +-------------------------------------------- +--------+------------------+-------------------------------------------------------+
52
+ | /computers | GET | computer_list | Retrieve a collection of computers |
53
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
54
+ | /computers | POST | computer_list | Create a computer |
55
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
56
+ | /computers/<int:id> | GET | computer_detail | Retrieve details of a computer |
57
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
58
+ | /computers/<int:id> | PATCH | computer_detail | Update a computer |
59
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
60
+ | /computers/<int:id> | DELETE | computer_detail | Delete a computer |
61
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
62
+ | /computers/<int:id>/owner | GET | person_detail | Retrieve details of the owner of a computer |
63
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
64
+ | /computers/<int:id>/owner | PATCH | person_detail | Update the owner of a computer |
65
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
66
+ | /computers/<int:id>/owner | DELETE | person_detail | Delete the owner of a computer |
67
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
68
+ | /computers/<int:id>/relationships /owner | GET | person_computers | Retrieve relationships between a person and computers |
69
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
70
+ | /computers/<int:id>/relationships /owner | POST | person_computers | Create relationships between a person and computers |
71
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
72
+ | /computers/<int:id>/relationships /owner | PATCH | person_computers | Update relationships between a person and computers |
73
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
74
+ | /computers/<int:id>/relationships /owner | DELETE | person_computers | Delete relationships between a person and computers |
75
+ +------------------------------------------- +--------+------------------+-------------------------------------------------------+
76
76
77
77
.. warning ::
78
78
0 commit comments