-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproduct_images__v1.yml
133 lines (131 loc) · 10.8 KB
/
product_images__v1.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
openapi: 3.0.0
info:
version: "1"
title: "ProductImages"
description: "" # todo
servers:
- url: http://catalog/openapi/ProductImages/v1
- url: https://rollun.net/api/openapi/ProductImages/v1
tags:
- name: Images # todo
paths:
"/images/{rid}":
put:
tags:
- Images
summary: "" # todo
parameters:
- name: rid
in: path
required: true
schema:
type: string
minLength: 5
maxLength: 5
example: "11111"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ImagesRequest'
responses:
"200":
description: "Success"
content:
application/json:
schema:
$ref: "#/components/schemas/ImagesResponse"
"500":
description: "Internal error"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ErrorResponse:
type: object
properties:
messages:
type: array
nullable: true
items:
$ref: "#/components/schemas/Message"
description: "Message field is not required"
Message:
type: object
properties:
level:
type: string
enum:
- emergency
- alert
- critical
- error
- warning
- notice
- info
type:
type: string
enum:
- UNDEFINED
- INVALID_RESPONSE
description: >
UNDEFINED - Any undefined message type
INVALID_RESPONSE - A message generated by the client stating that the response could not be decoded
text:
type: string
description: Message, that describes what went wrong
SuccessResponse:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
type: object
properties:
data:
type: object
ImagesResponse:
type: object
allOf:
- $ref: '#/components/schemas/SuccessResponse'
properties:
data:
type: object
description: "Record from FeaturedImagesStore for this rid after update"
additionalProperties: true
ImagesRequest:
type: object
required:
- images
properties:
images:
type: array
nullable: false
description: "Array of images that we want to upload"
items:
allOf:
- $ref: '#/components/schemas/Image'
## Resource object
Image:
type: object
description: "At least 1 field MUST be filled. If filled both - priority to binData.
Tested supported extensions: .jpg, .png
Potentially supported formats: JPEG, PNG, GIF, BMP, WBMP, GD2, WEBP and AVIF
Details here: https://www.php.net/manual/en/function.imagecreatefromstring.php"
properties:
key:
type: string
nullable: true
description: "(Optional) key defined by client for specific image, that will be return in result to identify this image.
If omitted - numeric keys will be used."
example: "64ef9b2b5c12a5"
url:
type: string
description: "Link to image anywhere in the internet that we want to upload to our system"
example: "https://rollun.s3.eu-central-1.amazonaws.com/images/logo.png"
binData:
type: string
format: byte
description: "Base64-encoded image data"
example: "// put here base64-encoded image data"
# example: "iVBORw0KGgoAAAANSUhEUgAAAMgAAAAoCAYAAAC7HLUcAAAKN2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8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