-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathserverless.doc.yml
54 lines (54 loc) · 1.74 KB
/
serverless.doc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
documentation:
version: '1'
title: ${self:custom.openapiTitle}
description: ${self:custom.openapiTitle} - example OpenAPI document
endpoints:
getImage:
summary: "Get Image by ID"
description: "Get a pre-signed temporary download URL for the image by ID"
requestBody:
description: "Get a pre-signed temporary download URL for the image by ID"
pathParams:
- name: "id"
description: "The ID of the image"
schema:
type: "number"
methodResponses:
- statusCode: 200
responseBody:
description: "the temporary download url"
responseModels:
application/json: "GetImageResponse"
uploadImage:
summary: "Upload Image by ID"
description: "Get a pre-signed temporary upload URL for the image by ID"
requestBody:
description: "Get a pre-signed temporary upload URL for the image by ID"
pathParams:
- name: "id"
description: "The ID of the image"
schema:
type: "number"
methodResponses:
- statusCode: 200
responseBody:
description: "the temporary upload url"
responseModels:
application/json: "UploadImageResponse"
models:
- name: "GetImageResponse"
description: "Get Image Response"
contentType: "application/json"
schema:
$schema: "http://json-schema.org/draft-04/schema#"
properties:
url:
type: "string"
- name: "UploadImageResponse"
description: "Upload Image Response"
contentType: "application/json"
schema:
$schema: "http://json-schema.org/draft-04/schema#"
properties:
url:
type: "string"