Implemented the GET /releases/{release-id}/rating endpoint for the Open API specification documentation in the library target.
This commit is contained in:
@@ -442,6 +442,24 @@ paths:
|
|||||||
$ref: '#/components/schemas/Release'
|
$ref: '#/components/schemas/Release'
|
||||||
'404':
|
'404':
|
||||||
$ref: '#/components/responses/NotFound'
|
$ref: '#/components/responses/NotFound'
|
||||||
|
/releases/{release_id}/rating:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Database
|
||||||
|
summary: Get information about a rating of release.
|
||||||
|
description: Retrieves the average rating and the total number of user ratings for a given release.
|
||||||
|
operationId: getReleaseRating
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/ReleaseId'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully retrieved release details.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ReleaseRating'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/NotFound'
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Artist:
|
Artist:
|
||||||
@@ -604,19 +622,7 @@ components:
|
|||||||
description: A number of users that want a release.
|
description: A number of users that want a release.
|
||||||
type: integer
|
type: integer
|
||||||
rating:
|
rating:
|
||||||
description: A type that represents a community rating of a release.
|
$ref: '#/components/schemas/Rating'
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
count:
|
|
||||||
description: A number of ratings given by users of a release.
|
|
||||||
type: integer
|
|
||||||
average:
|
|
||||||
description: An average of the ratings given by users of a release.
|
|
||||||
type: number
|
|
||||||
format: float
|
|
||||||
required:
|
|
||||||
- average
|
|
||||||
- count
|
|
||||||
submitter:
|
submitter:
|
||||||
description: A reference of a user that submitted the release into the database.
|
description: A reference of a user that submitted the release into the database.
|
||||||
$ref: '#/components/schemas/UserId'
|
$ref: '#/components/schemas/UserId'
|
||||||
@@ -897,6 +903,20 @@ components:
|
|||||||
- per_page
|
- per_page
|
||||||
- items
|
- items
|
||||||
- urls
|
- urls
|
||||||
|
Rating:
|
||||||
|
description: A type that represents a community rating of a release.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
count:
|
||||||
|
description: A number of ratings given by users of a release.
|
||||||
|
type: integer
|
||||||
|
average:
|
||||||
|
description: An average of the ratings given by users of a release.
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
required:
|
||||||
|
- average
|
||||||
|
- count
|
||||||
Release:
|
Release:
|
||||||
description: A type that eepresents a particular physical or digital object released by one or more artists.
|
description: A type that eepresents a particular physical or digital object released by one or more artists.
|
||||||
type: object
|
type: object
|
||||||
@@ -1058,6 +1078,19 @@ components:
|
|||||||
- name
|
- name
|
||||||
- qty
|
- qty
|
||||||
- descriptions
|
- descriptions
|
||||||
|
ReleaseRating:
|
||||||
|
description: A type that represents a community rating of a release.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rating:
|
||||||
|
$ref: '#/components/schemas/Rating'
|
||||||
|
release_id:
|
||||||
|
description: An identifier of a release.
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
required:
|
||||||
|
- rating
|
||||||
|
- release_id
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user