summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Reeder <colin@vpzom.click>2020-10-14 16:37:20 -0600
committerColin Reeder <colin@vpzom.click>2020-10-14 16:37:36 -0600
commit332d47f81ab0481757ee871f0cedd873154b1caf (patch)
tree29563cd86323cba96553c1779c099a041f782754
parent6f183c37ed24dfe1b8fc69a68f31b10bda3e49bd (diff)
Add media upload API to docs
-rw-r--r--openapi/openapi.json30
1 files changed, 28 insertions, 2 deletions
diff --git a/openapi/openapi.json b/openapi/openapi.json
index d79869f..4d54e83 100644
--- a/openapi/openapi.json
+++ b/openapi/openapi.json
@@ -2,7 +2,7 @@
"openapi": "3.0.1",
"info": {
"title": "lotide API",
- "version": "0.6.0-pre"
+ "version": "0.7.0-pre"
},
"components": {
"schemas": {
@@ -957,6 +957,29 @@
"security": [{"bearer": []}]
}
},
+ "/api/unstable/media": {
+ "post": {
+ "summary": "Upload an image",
+ "description": "Uploads an image as hosted media. File content must be sent as the request body.",
+ "responses": {
+ "200": {
+ "description": "Successfully uploaded.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": ["id"],
+ "properties": {
+ "id": {"type": "string"}
+ }
+ }
+ }
+ }
+ }
+ },
+ "security": [{"bearer": []}]
+ }
+ },
"/api/unstable/misc/render_markdown": {
"post": {
"summary": "Preview Markdown rendering",
@@ -1020,7 +1043,10 @@
"required": ["community", "title"],
"properties": {
"community": {"type": "integer"},
- "href": {"type": "string"},
+ "href": {
+ "type": "string",
+ "description": "URL target for the post. Can be set to a hosted media file by specifying `local-media://<id>`"
+ },
"content_markdown": {"type": "string"},
"content_text": {"type": "string"},
"title": {"type": "string"}