Skip to content

Commit

Permalink
Document user comments endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp-work committed Apr 27, 2023
1 parent d875ba6 commit 2dfe836
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/public/apidocs-new/OBS-v2.10.50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ paths:

/comment/{comment_id}:
$ref: 'paths/comment_comment_id.yaml'
/comments/user:
$ref: 'paths/comments_user.yaml'
/comments/request/{id}:
$ref: 'paths/comments_request_id.yaml'
/comments/project/{project_name}:
Expand Down
16 changes: 16 additions & 0 deletions src/api/public/apidocs-new/components/schemas/comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,21 @@ properties:
type: string
xml:
attribute: true
parent:
type: integer
xml:
attribute: true
bsrequest:
type: integer
xml:
attribute: true
project:
type: string
xml:
attribute: true
package:
type: string
xml:
attribute: true
# This schema is incomplete due to https://github.com/OAI/OpenAPI-Specification/issues/630,
# comment element should have content
4 changes: 4 additions & 0 deletions src/api/public/apidocs-new/components/schemas/comments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ properties:
type: string
xml:
attribute: true
user:
type: string
xml:
attribute: true
xml:
name: comments
22 changes: 22 additions & 0 deletions src/api/public/apidocs-new/paths/comments_user.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
get:
summary: List all the logged in user's comments
description: List all the comments for the currently logged in user.
security:
- basic_authentication: []
responses:
'200':
description: OK. The request has succeeded.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/comments.yaml'
example: |
<comments user="Iggy">
<comment who="Iggy" when="2021-10-15 13:28:22 UTC" id="1" bsrequest="115">This is a pretty cool request!</comment>
<comment who="Iggy" when="2021-10-15 13:49:39 UTC" id="2" project="home:Admin">This is a pretty cool project!</comment>
<comment who="Iggy" when="2021-10-15 13:54:38 UTC" id="3" project="home:Admin" package="0ad">This is a pretty cool package!</comment>
</comments>
'401':
$ref: '../components/responses/unauthorized.yaml'
tags:
- Comments

0 comments on commit 2dfe836

Please sign in to comment.