This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yml
135 lines (118 loc) · 2.64 KB
/
swagger.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
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
swagger: "2.0"
consumes:
- application/json
produces:
- application/json
info:
version: 0.2.0
title: Facade.
description: A queuing wrapper.
basePath: /
schemes:
- http
definitions:
UserRender:
type: object
required:
- user
- callback
properties:
user:
$ref: "#/definitions/userPath"
callback:
$ref: "#/definitions/url"
extra:
$ref: '#/definitions/extra'
example:
user: "@sergeysova"
callback: "/preview/user/@sergeysova"
extra:
foo: bar
baz: true
CardRender:
type: object
required:
- card
- callback
properties:
card:
$ref: '#/definitions/cardPath'
callback:
$ref: '#/definitions/url'
extra:
$ref: '#/definitions/extra'
example:
card: "1902"
callback: "/preview/card/1902"
extra:
foo: bar
baz: true
url:
type: string
userPath:
type: string
description: Username to identify user. Should be prefixed @
minLength: 1
maxLength: 200
cardPath:
type: string
description: Id or card slug
minLength: 1
maxLength: 200
extra:
type: object
description: Optional object with any information for render worker
Error:
type: object
required:
- code
- message
properties:
code:
description: Either same as HTTP Status Code.
type: integer
format: int32
message:
type: string
responses:
NoContent:
description: The server successfully processed the request and is not returning any content.
GenericError:
description: Generic error response.
schema:
$ref: "#/definitions/Error"
paths:
/render/user:
post:
description: Render user preview
operationId: renderUser
parameters:
- name: body
required: true
in: body
schema:
$ref: "#/definitions/UserRender"
- { $ref: "#/parameters/appName" }
responses:
"200": { $ref: "#/responses/NoContent" }
default: { $ref: "#/responses/GenericError" }
/render/card:
post:
description: Render preview and snapshot for card
operationId: renderCard
parameters:
- name: body
required: true
in: body
schema:
$ref: '#/definitions/CardRender'
- { $ref: "#/parameters/appName" }
responses:
"200": { $ref: "#/responses/NoContent" }
default: { $ref: "#/responses/GenericError" }
parameters:
appName:
name: appName
in: query
type: string
description: Name of the app that call api