Implemented the GET /releases/{release-id}/rating/{username} endpoint for the Open API specification documentation in the library target.

This commit is contained in:
2025-10-09 17:27:52 +02:00
parent 9134598b6a
commit 8b1d727533
+49 -1
View File
@@ -453,13 +453,32 @@ paths:
- $ref: '#/components/parameters/ReleaseId'
responses:
'200':
description: Successfully retrieved release details.
description: Successfully retrieved release rating details.
content:
application/json:
schema:
$ref: '#/components/schemas/ReleaseRating'
'404':
$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:
schemas:
Artist:
@@ -1091,6 +1110,27 @@ components:
required:
- rating
- 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:
description: A type that represents a version of a release.
type: object
@@ -1390,6 +1430,14 @@ components:
enum:
- asc
- desc
Username:
description: A username of a user.
name: username
in: path
required: true
schema:
type: string
example: memory
headers:
Link:
description: |