-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
72 lines (71 loc) · 1.66 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
openapi: "3.0.0"
info:
title: Jackal API
version: 1.0.0
paths:
/api/v1/crop:
get:
summary: Fetch image and try to crop it to specified size
parameters:
- name: url
in: query
description: url for image to be cropped
required: true
schema:
type: string
- name: width
in: query
description: width of cropped image
required: true
schema:
type: integer
format: int32
- name: height
in: query
description: height of cropped image
required: true
schema:
type: integer
format: int32
- name: type
in: query
description: Type of crop. Allowed choices default and ratio
required: false
schema:
type: string
responses:
'200':
description: Response with cropped image
content:
image/jpeg:
schema:
type: string
format: binary
image/png:
schema:
type: string
format: binary
image/gif:
schema:
type: string
format: binary
'400':
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/CropErrors"
components:
schemas:
CropErrors:
type: object
properties:
errors:
type: object
properties:
url:
type: string
width:
type: string
height:
type: string