From f093ec01dad27b25ba4ed18c4cd1aa3ed59a356b Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Wed, 8 Oct 2025 23:50:21 +0200 Subject: [PATCH] Implemented the GET / endpoint for the Open API specification documentation in the library target. --- Sources/DiscogsService/openapi.yaml | 87 +++++++++++++++-------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index 9fdf3769a..08ae627a9 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -247,9 +247,9 @@ paths: get: tags: - Service - operationId: service summary: Get service information. description: Retrieves any available information related to the service. + operationId: getService responses: '200': description: Service information returned successfully. @@ -261,56 +261,57 @@ paths: $ref: '#/components/responses/Unavailable' components: 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 properties: message: + description: A message of a service error. type: string - Service: - type: object - 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 + required: + - message responses: Unavailable: description: The service is currently unavailable to handle requests. content: application/json: schema: - $ref: '#/components/schemas/Error' - 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' + $ref: '#/components/schemas/ServiceError' example: - message: Service not available. + message: Server is currently unavailable.