-
Notifications
You must be signed in to change notification settings - Fork 13
/
dali-openapi3_1.yaml
101 lines (98 loc) · 3.03 KB
/
dali-openapi3_1.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
openapi: 3.1.0
info:
title: Dali - OpenAPI 3.1
description: |-
Dali (named after the great painter Salvador Dali) is a service which performs image transformations. The application supports:
Retrieving source images from either an HTTP URL or an S3 bucket.
Encoding images to PNG, JPEG, WEBP or HEIC
Resizing an image
Rotating an image
Apply a watermark image to an image
Some useful links:
- [Dali repository](https://github.com/olxgroup-oss/dali/)
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: http://localhost:8080
description: application server
- url: http://localhost:8081
description: metrics server
tags:
- name: Metrics
description: Prometheus metrics
- name: Image
description: Fetches an image from either an HTTP server or an S3 bucket
paths:
/metrics:
get:
tags:
- Metrics
summary: Fetch Prometheus metrics
description: Fetch server metrics in the format supported by Prometheus
responses:
'200':
description: Successful operation
/:
get:
tags:
- Image
summary: Fetch image from an HTTP server or S3 bucket
description: Fetches an image hosted behind either an HTTP server or an S3 bucket in order to process it
parameters:
- name: image_address
in: query
description: The HTTP url where the testing image resides or the key of the image inside the S3 bucket
required: true
schema:
type: string
default: http://localhost:2969/dali-public/test-image.jpeg
explode: true
enum:
- "http://localhost:2969/dali-public/test-image.jpeg"
- "test-image.jpeg"
- name: rotation
in: query
description: The applied rotation to the processed image
required: true
schema:
type: string
default: R90
- name: quality
in: query
description: The quality of the processed image
required: true
schema:
type: string
default: 70
- name: f
in: query
description: The desired format of the processed image
required: true
schema:
type: string
default: png
- name: size[width]
in: query
description: The desired width of the processed image
required: true
schema:
type: string
default: 256
- name: size[height]
in: query
description: The desired height of the processed image
required: true
schema:
type: string
default: 256
responses:
'200':
description: successful operation
'400':
description: Invalid URL provided
'404':
description: The file coouldn't be found at the provided URL
'500':
description: Something went wrong