Implemented the GET / endpoint for the Open API specification documentation in the library target.
This commit is contained in:
@@ -247,9 +247,9 @@ paths:
|
|||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Service
|
- Service
|
||||||
operationId: service
|
|
||||||
summary: Get service information.
|
summary: Get service information.
|
||||||
description: Retrieves any available information related to the service.
|
description: Retrieves any available information related to the service.
|
||||||
|
operationId: getService
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Service information returned successfully.
|
description: Service information returned successfully.
|
||||||
@@ -261,56 +261,57 @@ paths:
|
|||||||
$ref: '#/components/responses/Unavailable'
|
$ref: '#/components/responses/Unavailable'
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Error:
|
Service:
|
||||||
|
description: A type that encapsulates any available information about the service.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
api_version:
|
||||||
|
description: A current API version of the service.
|
||||||
|
type: string
|
||||||
|
documentation_url:
|
||||||
|
description: A URI link to the Developers' documentation available online.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
hello:
|
||||||
|
description: A welcome message send by the service.
|
||||||
|
type: string
|
||||||
|
statistics:
|
||||||
|
description: A type that encapsulates statistical data about the service.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
artists:
|
||||||
|
description: A total number of artists registered in the service.
|
||||||
|
type: integer
|
||||||
|
labels:
|
||||||
|
description: A total number of labels registered in the service.
|
||||||
|
type: integer
|
||||||
|
releases:
|
||||||
|
description: A total number of releases registered in the service.
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- artists
|
||||||
|
- labels
|
||||||
|
- releases
|
||||||
|
required:
|
||||||
|
- api_version
|
||||||
|
- documentation_url
|
||||||
|
- hello
|
||||||
|
- statistics
|
||||||
|
ServiceError:
|
||||||
|
description: A type that contains any error data.
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
message:
|
message:
|
||||||
|
description: A message of a service error.
|
||||||
type: string
|
type: string
|
||||||
Service:
|
required:
|
||||||
type: object
|
- message
|
||||||
description: A type that contains all available service information.
|
|
||||||
properties:
|
|
||||||
hello:
|
|
||||||
description: A welcome message from the service.
|
|
||||||
type: string
|
|
||||||
api_version:
|
|
||||||
description: A current version of the service.
|
|
||||||
type: string
|
|
||||||
documentation_url:
|
|
||||||
description: A URL to the developers' documentation.
|
|
||||||
type: string
|
|
||||||
statistics:
|
|
||||||
type: object
|
|
||||||
description: A type that contains the service's statistics.
|
|
||||||
properties:
|
|
||||||
releases:
|
|
||||||
description: A number of registered releases in the service.
|
|
||||||
type: integer
|
|
||||||
artists:
|
|
||||||
description: A number of registered artists in the service.
|
|
||||||
type: integer
|
|
||||||
labels:
|
|
||||||
description: A number of registered labels in the service.
|
|
||||||
type: integer
|
|
||||||
responses:
|
responses:
|
||||||
Unavailable:
|
Unavailable:
|
||||||
description: The service is currently unavailable to handle requests.
|
description: The service is currently unavailable to handle requests.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Error'
|
$ref: '#/components/schemas/ServiceError'
|
||||||
examples:
|
|
||||||
timeout:
|
|
||||||
value:
|
|
||||||
message: Query time exceeded. Please try a simpler query.
|
|
||||||
malformed:
|
|
||||||
value:
|
|
||||||
message: An internal server error occurred.
|
|
||||||
Unauthorized:
|
|
||||||
description: Some authentication information is missing or invalid.
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Error'
|
|
||||||
example:
|
example:
|
||||||
message: Service not available.
|
message: Server is currently unavailable.
|
||||||
|
|||||||
Reference in New Issue
Block a user