57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: Cairnquire Foundation API
|
|
version: 0.1.0
|
|
servers:
|
|
- url: http://localhost:8080
|
|
paths:
|
|
/health:
|
|
get:
|
|
summary: Health check
|
|
operationId: getHealth
|
|
responses:
|
|
"200":
|
|
description: Healthy
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
status:
|
|
type: string
|
|
database:
|
|
type: string
|
|
contentStore:
|
|
type: string
|
|
/api/uploads:
|
|
post:
|
|
summary: Upload a single attachment
|
|
operationId: uploadAttachment
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
file:
|
|
type: string
|
|
format: binary
|
|
responses:
|
|
"201":
|
|
description: Attachment stored
|
|
/attachments/{hash}:
|
|
get:
|
|
summary: Download an attachment by content hash
|
|
operationId: getAttachment
|
|
parameters:
|
|
- in: path
|
|
name: hash
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Attachment content
|
|
|