Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions common/schemas/Attachment.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,26 @@ components:
sha256:
type: string
description: The SHA256 hash of the chunk

AttachmentFormData:
required:
- file
- attachment
properties:
file:
format: binary
description: The file to upload
type: string
attachment:
$ref: "#/components/schemas/AttachmentBase"

AttachmentChunkForm:
required:
- data
properties:
data:
format: binary
description: The file to upload
type: string
chunk:
$ref: "#/components/schemas/Chunk"
24 changes: 12 additions & 12 deletions tools/attachment/attachment.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ paths:
content:
text/event-stream:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/Attachment"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentBase"
example: |-
data:{"id":"987b8913-f7df-4af0-9bcd-c593d1d43497","date":"2023-04-10T07:22:24.510+00:00","text":"string","@baseType":"Note","@type":"Note"}
data:{"id":"987b8913-f7df-4af0-9bcd-c593d1d43498","date":"2023-04-10T07:22:24.510+00:00","text":"string","@baseType":"Note","@type":"Note"}
Expand All @@ -74,7 +74,7 @@ paths:
schema:
type: array
items:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/Attachment"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentBase"
"400":
$ref: "../../common/responses/errors.openapi.yaml#/components/responses/Error-400"
"401":
Expand Down Expand Up @@ -141,7 +141,7 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultipart"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultiPart"
multipart/form-data:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentFormData"
Expand All @@ -157,7 +157,7 @@ paths:
application/json:
schema:
allOf:
- $ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/Attachment"
- $ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentBase"
headers:
ETag:
$ref: "../../common/utils/update.openapi.yaml#/components/headers/ETag"
Expand All @@ -174,7 +174,7 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/Attachment"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentBase"
headers:
ETag:
$ref: "../../common/utils/update.openapi.yaml#/components/headers/ETag"
Expand Down Expand Up @@ -240,7 +240,7 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultipart"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultiPart"
multipart/form-data:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentFormData"
Expand Down Expand Up @@ -286,7 +286,7 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/Attachment"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentBase"
headers:
ETag:
$ref: "../../common/utils/update.openapi.yaml#/components/headers/ETag"
Expand Down Expand Up @@ -318,7 +318,7 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/Attachment"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentBase"
parameters:
- $ref: "../../common/utils/update.openapi.yaml#/components/parameters/If-Match"
responses:
Expand All @@ -327,7 +327,7 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/Attachment"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentBase"
"400":
$ref: "../../common/responses/errors.openapi.yaml#/components/responses/Error-400"
"401":
Expand Down Expand Up @@ -418,14 +418,14 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultipart"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultiPart"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultipart"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultiPart"
"400":
$ref: "../../common/responses/errors.openapi.yaml#/components/responses/Error-400"
"401":
Expand Down Expand Up @@ -494,7 +494,7 @@ paths:
content:
application/json:
schema:
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultipart"
$ref: "../../common/schemas/Attachment.openapi.yaml#/components/schemas/AttachmentMultiPart"
"400":
$ref: "../../common/responses/errors.openapi.yaml#/components/responses/Error-400"
"401":
Expand Down