Implemented the GET /releases/{release-id}/rating/{username} endpoint for the Open API specification documentation in the library target.
This commit is contained in:
@@ -453,13 +453,32 @@ paths:
|
|||||||
- $ref: '#/components/parameters/ReleaseId'
|
- $ref: '#/components/parameters/ReleaseId'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successfully retrieved release details.
|
description: Successfully retrieved release rating details.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ReleaseRating'
|
$ref: '#/components/schemas/ReleaseRating'
|
||||||
'404':
|
'404':
|
||||||
$ref: '#/components/responses/NotFound'
|
$ref: '#/components/responses/NotFound'
|
||||||
|
/releases/{release_id}/rating/{username}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Database
|
||||||
|
summary: Get information about a rating of release by a user.
|
||||||
|
description: Retrieves the rating for a given release by a specific user.
|
||||||
|
operationId: getReleaseRatingByUser
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/ReleaseId'
|
||||||
|
- $ref: '#/components/parameters/Username'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully retrieved release rating details by a given user.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ReleaseRatingByUser'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/NotFound'
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Artist:
|
Artist:
|
||||||
@@ -1091,6 +1110,27 @@ components:
|
|||||||
required:
|
required:
|
||||||
- rating
|
- rating
|
||||||
- release_id
|
- release_id
|
||||||
|
ReleaseRatingByUser:
|
||||||
|
description: A type that represents a rating of a release by a user.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
username:
|
||||||
|
description: A username of a user.
|
||||||
|
type: string
|
||||||
|
readOnly: true
|
||||||
|
release_id:
|
||||||
|
description: An identifier of a release.
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
rating:
|
||||||
|
description: A number that defines a rating value of a release.
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
maximum: 5
|
||||||
|
required:
|
||||||
|
- rating
|
||||||
|
- release_id
|
||||||
|
- username
|
||||||
ReleaseVersion:
|
ReleaseVersion:
|
||||||
description: A type that represents a version of a release.
|
description: A type that represents a version of a release.
|
||||||
type: object
|
type: object
|
||||||
@@ -1390,6 +1430,14 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- asc
|
- asc
|
||||||
- desc
|
- desc
|
||||||
|
Username:
|
||||||
|
description: A username of a user.
|
||||||
|
name: username
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: memory
|
||||||
headers:
|
headers:
|
||||||
Link:
|
Link:
|
||||||
description: |
|
description: |
|
||||||
|
|||||||
Reference in New Issue
Block a user