Skip to content

Commit cd7278b

Browse files
committed
Integrate comments
1 parent 55b5ce5 commit cd7278b

File tree

10 files changed

+66
-63
lines changed

10 files changed

+66
-63
lines changed

api-spec/index.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ paths:
1515
$ref: paths/activity/index.yaml
1616
"/activity/{id}":
1717
$ref: paths/activity/_id/index.yaml
18-
"/activity/comment":
19-
$ref: paths/activity/comment/index.yaml
20-
"/activity/comment/{id}":
21-
$ref: paths/activity/comment/_id/index.yaml
2218
"/assets/{id}":
2319
$ref: paths/assets/_id/index.yaml
2420
"/auth/login":
@@ -39,6 +35,10 @@ paths:
3935
$ref: paths/collections/index.yaml
4036
"/collections/{id}":
4137
$ref: paths/collections/_id/index.yaml
38+
"/comments":
39+
$ref: paths/comments/index.yaml
40+
"/comments/{id}":
41+
$ref: paths/comments/_id/index.yaml
4242
"/dashboards":
4343
$ref: paths/dashboards/index.yaml
4444
"/dashboards/{id}":
@@ -212,6 +212,9 @@ tags:
212212
- name: Collections
213213
description: Collections are the individual collections of items, similar to tables in a database. Changes to collections will alter the schema of the database.
214214
x-collection: directus_collections
215+
- name: Comments
216+
description: Comments are a collaboration tool and can be left on items from the sidebar.
217+
x-collection: directus_comments
215218
- name: Dashboards
216219
description: Dashboards within the Insights module organize different Panels into an at-a-glance view. They can be used to group data based on department, objective, business process or anything you choose.
217220
- name: Extensions

api-spec/paths/activity/comment/_id/deleteComment.yaml renamed to api-spec/paths/comments/_id/deleteComment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ summary: Delete a Comment
22
description: Delete an existing comment. Deleted comments can not be retrieved.
33
operationId: deleteComment
44
parameters:
5-
- $ref: ../../../../components/parameters.yaml#/Id
5+
- $ref: ../../../components/parameters.yaml#/Id
66
responses:
77
'204':
88
description: The resource was deleted successfully.
99
'401':
10-
$ref: ../../../../components/responses.yaml#/UnauthorizedError
10+
$ref: ../../../components/responses.yaml#/UnauthorizedError
1111
'404':
12-
$ref: ../../../../components/responses.yaml#/NotFoundError
12+
$ref: ../../../components/responses.yaml#/NotFoundError
1313
security: []
1414
tags:
15-
- Activity
15+
- Comments
1616
x-codeSamples:
1717
- label: Directus SDK
1818
lang: JavaScript

api-spec/paths/activity/comment/_id/getComment.yaml renamed to api-spec/paths/comments/_id/getComment.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ summary: Get Comment by ID
22
description: Returns a single comment by primary key.
33
operationId: getComment
44
parameters:
5-
- $ref: ../../../../components/parameters.yaml#/Id
6-
- $ref: ../../../../components/parameters.yaml#/Fields
7-
- $ref: ../../../../components/parameters.yaml#/Meta
5+
- $ref: ../../../components/parameters.yaml#/Id
6+
- $ref: ../../../components/parameters.yaml#/Fields
7+
- $ref: ../../../components/parameters.yaml#/Meta
88
responses:
99
'200':
1010
description: Successful request
@@ -14,14 +14,14 @@ responses:
1414
type: object
1515
properties:
1616
data:
17-
$ref: ../../../../components/schemas/Comments.yaml
17+
$ref: ../../../components/schemas/Comments.yaml
1818
'401':
19-
$ref: ../../../../components/responses.yaml#/UnauthorizedError
19+
$ref: ../../../components/responses.yaml#/UnauthorizedError
2020
'404':
21-
$ref: ../../../../components/responses.yaml#/NotFoundError
21+
$ref: ../../../components/responses.yaml#/NotFoundError
2222
security: []
2323
tags:
24-
- Activity
24+
- Comments
2525
x-codeSamples:
2626
- label: Directus SDK
2727
lang: JavaScript
File renamed without changes.

api-spec/paths/activity/comment/_id/updateComment.yaml renamed to api-spec/paths/comments/_id/updateComment.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ summary: Update a Comment
22
description: Update the content of an existing comment.
33
operationId: updateComment
44
parameters:
5-
- $ref: ../../../../components/parameters.yaml#/Id
6-
- $ref: ../../../../components/parameters.yaml#/Meta
5+
- $ref: ../../../components/parameters.yaml#/Id
6+
- $ref: ../../../components/parameters.yaml#/Meta
77
requestBody:
88
content:
99
application/json:
1010
schema:
1111
anyOf:
12-
- $ref: ../../../../components/schemas/Comments.yaml
12+
- $ref: ../../../components/schemas/Comments.yaml
1313
responses:
1414
'200':
1515
content:
@@ -18,15 +18,15 @@ responses:
1818
type: object
1919
properties:
2020
data:
21-
$ref: ../../../../components/schemas/Activity.yaml
21+
$ref: ../../../components/schemas/Activity.yaml
2222
description: Successful request
2323
'401':
24-
$ref: ../../../../components/responses.yaml#/UnauthorizedError
24+
$ref: ../../../components/responses.yaml#/UnauthorizedError
2525
'404':
26-
$ref: ../../../../components/responses.yaml#/NotFoundError
26+
$ref: ../../../components/responses.yaml#/NotFoundError
2727
security: []
2828
tags:
29-
- Activity
29+
- Comments
3030
x-codeSamples:
3131
- label: Directus SDK
3232
lang: JavaScript

api-spec/paths/activity/comment/createComments.yaml renamed to api-spec/paths/comments/createComments.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ summary: Create Multiple comments
22
description: Create multiple new comments.
33
operationId: createComments
44
parameters:
5-
- $ref: ../../../components/parameters.yaml#/Fields
6-
- $ref: ../../../components/parameters.yaml#/Limit
7-
- $ref: ../../../components/parameters.yaml#/Meta
8-
- $ref: ../../../components/parameters.yaml#/Offset
9-
- $ref: ../../../components/parameters.yaml#/Sort
10-
- $ref: ../../../components/parameters.yaml#/Filter
11-
- $ref: ../../../components/parameters.yaml#/Search
5+
- $ref: ../../components/parameters.yaml#/Fields
6+
- $ref: ../../components/parameters.yaml#/Limit
7+
- $ref: ../../components/parameters.yaml#/Meta
8+
- $ref: ../../components/parameters.yaml#/Offset
9+
- $ref: ../../components/parameters.yaml#/Sort
10+
- $ref: ../../components/parameters.yaml#/Filter
11+
- $ref: ../../components/parameters.yaml#/Search
1212
requestBody:
1313
content:
1414
application/json:
@@ -18,7 +18,7 @@ requestBody:
1818
data:
1919
type: array
2020
items:
21-
$ref: ../../../components/schemas/Comments.yaml
21+
$ref: ../../components/schemas/Comments.yaml
2222
responses:
2323
'200':
2424
description: Successful request
@@ -30,16 +30,16 @@ responses:
3030
data:
3131
type: array
3232
items:
33-
$ref: ../../../components/schemas/Comments.yaml
33+
$ref: ../../components/schemas/Comments.yaml
3434
meta:
35-
$ref: ../../../components/schemas/x-metadata.yaml
35+
$ref: ../../components/schemas/x-metadata.yaml
3636
'401':
37-
$ref: ../../../components/responses.yaml#/UnauthorizedError
37+
$ref: ../../components/responses.yaml#/UnauthorizedError
3838
'404':
39-
$ref: ../../../components/responses.yaml#/NotFoundError
39+
$ref: ../../components/responses.yaml#/NotFoundError
4040
security: []
4141
tags:
42-
- Activity
42+
- Comments
4343
x-codeSamples:
4444
- label: Directus SDK
4545
lang: JavaScript

api-spec/paths/activity/comment/deleteComments.yaml renamed to api-spec/paths/comments/deleteComments.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ responses:
1414
'204':
1515
description: The resource was deleted successfully.
1616
'401':
17-
$ref: ../../../components/responses.yaml#/UnauthorizedError
17+
$ref: ../../components/responses.yaml#/UnauthorizedError
1818
'404':
19-
$ref: ../../../components/responses.yaml#/NotFoundError
19+
$ref: ../../components/responses.yaml#/NotFoundError
2020
security: []
2121
tags:
22-
- Activity
22+
- Comments
2323
x-codeSamples:
2424
- label: Directus SDK
2525
lang: JavaScript

api-spec/paths/activity/comment/getComments.yaml renamed to api-spec/paths/comments/getComments.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ summary: Get Comments
33
description: Returns a list of comments.
44
operationId: getComments
55
parameters:
6-
- $ref: ../../../components/parameters.yaml#/Fields
7-
- $ref: ../../../components/parameters.yaml#/Limit
8-
- $ref: ../../../components/parameters.yaml#/Meta
9-
- $ref: ../../../components/parameters.yaml#/Offset
10-
- $ref: ../../../components/parameters.yaml#/Sort
11-
- $ref: ../../../components/parameters.yaml#/Filter
12-
- $ref: ../../../components/parameters.yaml#/Search
6+
- $ref: ../../components/parameters.yaml#/Fields
7+
- $ref: ../../components/parameters.yaml#/Limit
8+
- $ref: ../../components/parameters.yaml#/Meta
9+
- $ref: ../../components/parameters.yaml#/Offset
10+
- $ref: ../../components/parameters.yaml#/Sort
11+
- $ref: ../../components/parameters.yaml#/Filter
12+
- $ref: ../../components/parameters.yaml#/Search
1313
responses:
1414
'200':
1515
content:
@@ -20,17 +20,17 @@ responses:
2020
data:
2121
type: array
2222
items:
23-
$ref: ../../../components/schemas/Comments.yaml
23+
$ref: ../../components/schemas/Comments.yaml
2424
meta:
25-
$ref: ../../../components/schemas/x-metadata.yaml
25+
$ref: ../../components/schemas/x-metadata.yaml
2626
description: Successful request
2727
'401':
28-
$ref: ../../../components/responses.yaml#/UnauthorizedError
28+
$ref: ../../components/responses.yaml#/UnauthorizedError
2929
'404':
30-
$ref: ../../../components/responses.yaml#/NotFoundError
30+
$ref: ../../components/responses.yaml#/NotFoundError
3131
security: []
3232
tags:
33-
- Activity
33+
- Comments
3434
x-codeSamples:
3535
- label: Directus SDK
3636
lang: JavaScript
File renamed without changes.

api-spec/paths/activity/comment/updateComments.yaml renamed to api-spec/paths/comments/updateComments.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ summary: Update Multiple comments
33
description: Update multiple existing comments.
44
operationId: updateComments
55
parameters:
6-
- $ref: ../../../components/parameters.yaml#/Fields
7-
- $ref: ../../../components/parameters.yaml#/Limit
8-
- $ref: ../../../components/parameters.yaml#/Meta
9-
- $ref: ../../../components/parameters.yaml#/Offset
10-
- $ref: ../../../components/parameters.yaml#/Sort
11-
- $ref: ../../../components/parameters.yaml#/Filter
12-
- $ref: ../../../components/parameters.yaml#/Search
6+
- $ref: ../../components/parameters.yaml#/Fields
7+
- $ref: ../../components/parameters.yaml#/Limit
8+
- $ref: ../../components/parameters.yaml#/Meta
9+
- $ref: ../../components/parameters.yaml#/Offset
10+
- $ref: ../../components/parameters.yaml#/Sort
11+
- $ref: ../../components/parameters.yaml#/Filter
12+
- $ref: ../../components/parameters.yaml#/Search
1313
requestBody:
1414
content:
1515
application/json:
1616
schema:
1717
type: object
1818
properties:
1919
data:
20-
$ref: ../../../components/schemas/Comments.yaml
20+
$ref: ../../components/schemas/Comments.yaml
2121
keys:
2222
type: array
2323
items:
@@ -33,16 +33,16 @@ responses:
3333
data:
3434
type: array
3535
items:
36-
$ref: ../../../components/schemas/Comments.yaml
36+
$ref: ../../components/schemas/Comments.yaml
3737
meta:
38-
$ref: ../../../components/schemas/x-metadata.yaml
38+
$ref: ../../components/schemas/x-metadata.yaml
3939
'401':
40-
$ref: ../../../components/responses.yaml#/UnauthorizedError
40+
$ref: ../../components/responses.yaml#/UnauthorizedError
4141
'404':
42-
$ref: ../../../components/responses.yaml#/NotFoundError
42+
$ref: ../../components/responses.yaml#/NotFoundError
4343
security: []
4444
tags:
45-
- Activity
45+
- Comments
4646
x-codeSamples:
4747
- label: Directus SDK
4848
lang: JavaScript

0 commit comments

Comments
 (0)