diff --git a/crate_db/api/crate_db_specs.yaml b/crate_db/api/crate_db_specs.yaml index 9efa5bf..d6c282a 100644 --- a/crate_db/api/crate_db_specs.yaml +++ b/crate_db/api/crate_db_specs.yaml @@ -1,8 +1,8 @@ -openapi: "3.1.0" +openapi: 3.1.0 info: title: "OpenAPI specification for managing RO-Crates" description: "Microservice for managing RO-Crates" - version: "0.1.0" + version: 0.1.0 servers: - url: /elixircloud/roc/v1 @@ -123,7 +123,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ROCrateResponse' + $ref: '#/components/schemas/CreateROCResponse' 400: $ref: '#/components/responses/BadRequest' 401: @@ -154,7 +154,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ROCrateResponse' + $ref: '#/components/schemas/CreateROCResponse' 400: $ref: '#/components/responses/BadRequest' 401: @@ -184,7 +184,7 @@ paths: multipart/form-data: schema: x-body-name: updateROCRequestBody - $ref: '#/components/schemas/UpdateROCRequestBody' + $ref: '#/components/schemas/CreateROCResponse' responses: 204: description: No Content @@ -326,14 +326,6 @@ components: format: uuid description: The unique identifier for the RO-Crate. example: 260e7aa0-2e07-484e-9da7-ee19fdd1800d - - ROCrateResponse: - type: object - properties: - _id: - type: string - description: The unique identifier for the RO-Crate. - example: 60b6c0f9f1d2c12a5c7d6b8e rocrate: type: string description: The link to the RO-Crate file in MinIO. @@ -376,71 +368,76 @@ components: - title - description + ProblemDetails: + type: object + properties: + type: + type: string + format: uri + description: A URI reference that identifies the problem type. When dereferenced, it might provide human-readable documentation for the problem type. + title: + type: string + description: A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for localization purposes. + status: + type: integer + format: int32 + description: The HTTP status code generated by the origin server for this occurrence of the problem. + detail: + type: string + description: A human-readable explanation specific to this occurrence of the problem. + instance: + type: string + format: uri + description: A URI reference that identifies the specific occurrence of the problem. It might provide further information if dereferenced. + code: + type: integer + format: int32 + description: Application-specific error code. + message: + type: string + description: A detailed error message. + + required: + - type + - title + - status + - detail + responses: BadRequest: description: Bad Request content: application/json: schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string + $ref: '#/components/schemas/ProblemDetails' Unauthorized: description: Unauthorized content: application/json: schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string + $ref: '#/components/schemas/ProblemDetails' Forbidden: description: Forbidden content: application/json: schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string + $ref: '#/components/schemas/ProblemDetails' NotFound: description: Resource Not Found content: application/json: schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string + $ref: '#/components/schemas/ProblemDetails' UnexpectedError: description: Unexpected Error content: application/json: schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string + $ref: '#/components/schemas/ProblemDetails' parameters: roc-id: