-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
147 lines (147 loc) · 3.76 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
info:
title: Document Transfer Service API
license:
name: MIT
url: https://github.com/codeforamerica/document-transfer-service/blob/main/LICENSE
version: 0.0.1
swagger: "2.0"
produces:
- application/json
host: example.org
tags:
- name: transfer
description: Operations about transfers
- name: health
description: Operations about healths
- name: api
description: Operations about apis
paths:
/transfer:
post:
description: Initiate a new transfer.
produces:
- application/json
consumes:
- application/json
parameters:
- name: postTransfer
in: body
required: true
schema:
$ref: '#/definitions/postTransfer'
responses:
"201":
description: Initiate a new transfer.
schema:
$ref: '#/definitions/TransferSuccess'
tags:
- transfer
operationId: postTransfer
/health:
get:
description: Check system health
produces:
- application/json
responses:
"200":
description: Check system health
schema:
$ref: '#/definitions/HealthStatus'
tags:
- health
operationId: getHealth
/api:
get:
description: Swagger compatible API description
produces:
- application/json
responses:
"200":
description: Swagger compatible API description
tags:
- api
operationId: getApi
/api/{name}:
get:
description: Swagger compatible API description for specific API
produces:
- application/json
parameters:
- in: path
name: name
description: Resource name of mounted API
type: string
required: true
- in: query
name: locale
description: Locale of API documentation
type: string
required: false
responses:
"200":
description: Swagger compatible API description for specific API
tags:
- api
operationId: getApiName
definitions:
postTransfer:
type: object
properties:
source:
type: object
description: The source document.
properties:
type:
type: string
description: The type of the source document.
enum:
- url
url:
type: string
format: uri
description: The URL of the document to be transferred. Required when the source type is "url".
required:
- type
- url
destination:
type: object
description: The destination for the document.
properties:
type:
type: string
description: The document destination type.
enum:
- onedrive
path:
type: string
description: The path to store the document in the destination.
default: ""
filename:
type: string
description: The filename to store the document as in the destination, if different from the source.
required:
- type
required:
- source
- destination
description: Initiate a new transfer.
TransferSuccess:
type: object
properties:
status:
type: string
description: The status of the transfer.
destination:
type: string
description: The destination type.
path:
type: string
description: The path withing the destination where the file was sent.
description: TransferSuccess model
HealthStatus:
type: object
properties:
status:
type: string
description: The current application health status.
description: HealthStatus model