-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
90 lines (90 loc) · 2.09 KB
/
openapi.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
swagger: "2.0"
info:
version: "2019-01-22T14:23:59Z"
title: "dev-data-uploader"
host: "oqy9q99uvb.execute-api.eu-west-1.amazonaws.com"
basePath: "/dev"
schemes:
- "https"
paths:
/:
get:
responses: {}
post:
summary: "Generate a signed POST URL"
description: "Generates a signed POST URL that a new distribution can be uploaded\
\ to"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "UploadRequest"
required: true
schema:
$ref: "#/definitions/UploadRequest"
responses:
200:
description: "200 response"
schema:
$ref: "#/definitions/UploadResponse"
400:
description: "400 response"
schema:
$ref: "#/definitions/ErrorResponse"
500:
description: "500 response"
schema:
$ref: "#/definitions/ErrorResponse"
403:
description: "403 response"
schema:
$ref: "#/definitions/ErrorResponse"
security:
- authenticate: []
securityDefinitions:
authenticate:
type: "apiKey"
name: "Authorization"
in: "header"
x-amazon-apigateway-authtype: "custom"
definitions:
UploadResponse:
type: "object"
required:
- "fields"
- "url"
properties:
fields:
type: "object"
title: "Form fields"
properties: {}
url:
type: "string"
format: "uri"
title: "S3 URL"
title: "Upload Response"
description: "Response object with the presigned post url and parameters to POST\
\ to S3"
UploadRequest:
type: "object"
required:
- "distributionId"
properties:
distributionId:
type: "string"
title: "Distrbution ID"
title: "Upload Request"
description: "Request to upload a file to S3"
ErrorResponse:
type: "object"
required:
- "message"
properties:
message:
type: "string"
title: "Error message"
title: "Error"
description: "Error response"