From d58bef0ad9dd6e0d096d0d6ccece9cc7b10f053b Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 25 Apr 2024 12:56:59 -0400 Subject: [PATCH] First draft of openapi spec for islandora events --- event.yml | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 event.yml diff --git a/event.yml b/event.yml new file mode 100644 index 0000000..6581d99 --- /dev/null +++ b/event.yml @@ -0,0 +1,109 @@ +openapi: 3.0.0 +info: + title: OCR and Media Processing Service + description: API to perform OCR on PDFs and images, and to process various media types based on MIME type. + version: "1.0.0" +servers: + - url: 'https://development-libops-isle-43b7d594.libops.site' +paths: + /: + put: + summary: Process media for OCR and other transformations. + description: Receives media and other related information, performs processing based on MIME type and provided arguments. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessEvent' + responses: + '204': + description: Processing successful. + '400': + description: Bad request, possibly due to unsupported MIME type or malformed data. + '415': + description: Unsupported Media Type + '500': + description: Internal server error +components: + schemas: + ProcessEvent: + type: object + properties: + actor: + $ref: '#/components/schemas/Actor' + object: + $ref: '#/components/schemas/MediaObject' + attachment: + $ref: '#/components/schemas/Attachment' + type: + type: string + example: "Activity" + summary: + type: string + example: "Generate Derivative" + Actor: + type: object + properties: + id: + type: string + format: uri + MediaObject: + type: object + properties: + id: + type: string + format: uri + url: + type: array + items: + $ref: '#/components/schemas/Link' + isNewVersion: + type: boolean + Link: + type: object + properties: + name: + type: string + type: + type: string + enum: [Link] + href: + type: string + format: uri + mediaType: + type: string + rel: + type: string + Attachment: + type: object + properties: + type: + type: string + content: + $ref: '#/components/schemas/AttachmentContent' + mediaType: + type: string + AttachmentContent: + type: object + properties: + mimetype: + type: string + args: + type: string + source_uri: + type: string + format: uri + destination_uri: + type: string + format: uri + file_upload_uri: + type: string + format: uri + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: API-Key +security: + - ApiKeyAuth: []