Skip to content

Commit

Permalink
Merge pull request #668 from ita-social-projects/bugfix/646-647/chang…
Browse files Browse the repository at this point in the history
…ed-user-comment-swagger

Changed swagger for Users and Comments
  • Loading branch information
abalanovsky authored Dec 11, 2023
2 parents f5cda47 + c01eaae commit e5270d8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
8 changes: 7 additions & 1 deletion docs/comment/comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ paths:
description: Creates and saves a new comment for specific cooperation.
produces:
- application/json
parameters:
- name: id
in: path
required: true
description: ID of the cooperation is required, to which the comment will be added
type: string
requestBody:
required: true
description: Create new comment.
Expand Down Expand Up @@ -126,4 +132,4 @@ paths:
example:
status: 404
code: DOCUMENT_NOT_FOUND
message: Cooperation with the specified id was not found.
message: Cooperation with the specified id was not found.
12 changes: 12 additions & 0 deletions docs/review/review-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,15 @@ definitions:
type: string
rating:
type: number
reviewStats:
type: object
properties:
stats:
type: array
items:
type: object
properties:
rating:
type: integer
count:
type: integer
31 changes: 29 additions & 2 deletions docs/user/user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -561,13 +561,18 @@ paths:
required: true
description: ID of the user for which we are looking for review statistics
type: string
- in: query
name: role
required: true
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/definitions/userStatsResponse'
$ref: '#/definitions/reviewStats'
example:
stats: [{ rating: 5, count: 1 }, { rating: 3, count: 1 }]
400:
Expand Down Expand Up @@ -616,6 +621,29 @@ paths:
required: true
description: ID of the user for whom we trying to find cooperations
type: string
- in: query
name: sort
schema:
type: string
default: { "order": "asc", "orderBy":"updatedAt" }
required: false
- in: query
name: skip
schema:
type: integer
default: 0
- in: query
name: status
schema:
type: string
default: 0
required: false
- in: query
name: limit
schema:
type: integer
default: 5
required: false
responses:
200:
description: OK
Expand Down Expand Up @@ -681,7 +709,6 @@ paths:
produces:
- application/json
parameters:
- name: id
in: path
required: true
description: ID of the user for whom we trying to find offers
Expand Down

0 comments on commit e5270d8

Please sign in to comment.