Skip to content

Commit 35576d3

Browse files
committed
BUG/MAJOR: spec: change mimetypes for raw and general_storage endpoints
1 parent 0a32175 commit 35576d3

File tree

3 files changed

+20
-31
lines changed

3 files changed

+20
-31
lines changed

specification/build/haproxy_spec.yaml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21759,7 +21759,7 @@ paths:
2175921759
- $ref: '#/parameters/transaction_id'
2176021760
- $ref: '#/parameters/version'
2176121761
produces:
21762-
- application/json
21762+
- text/plain
2176321763
responses:
2176421764
"200":
2176521765
description: Operation successful
@@ -21774,12 +21774,7 @@ paths:
2177421774
description: Configuration file version
2177521775
type: string
2177621776
schema:
21777-
properties:
21778-
data:
21779-
type: string
21780-
required:
21781-
- data
21782-
type: object
21777+
type: string
2178321778
default:
2178421779
$ref: '#/responses/DefaultError'
2178521780
summary: Return HAProxy configuration
@@ -21822,7 +21817,7 @@ paths:
2182221817
- $ref: '#/parameters/version'
2182321818
- $ref: '#/parameters/force_reload'
2182421819
produces:
21825-
- application/json
21820+
- text/plain
2182621821
responses:
2182721822
"201":
2182821823
description: New HAProxy configuration pushed
@@ -23142,7 +23137,7 @@ paths:
2314223137
in: formData
2314323138
name: file_upload
2314423139
type: file
23145-
x-mimetype: text/plain
23140+
x-mimetype: application/octet-stream
2314623141
responses:
2314723142
"201":
2314823143
description: General use file created with its contents
@@ -23202,7 +23197,7 @@ paths:
2320223197
- Storage
2320323198
put:
2320423199
consumes:
23205-
- text/plain
23200+
- multipart/form-data
2320623201
description: Replaces the contents of a managed general use file on disk
2320723202
operationId: replaceStorageGeneralFile
2320823203
parameters:
@@ -23211,11 +23206,11 @@ paths:
2321123206
name: name
2321223207
required: true
2321323208
type: string
23214-
- in: body
23215-
name: data
23216-
required: true
23217-
schema:
23218-
type: string
23209+
- description: General use file content
23210+
in: formData
23211+
name: file_upload
23212+
type: file
23213+
x-mimetype: application/octet-stream
2321923214
- $ref: '#/parameters/skip_reload'
2322023215
- $ref: '#/parameters/force_reload'
2322123216
produces:

specification/paths/configuration/raw.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ configuration:
88
- $ref: "#/parameters/transaction_id"
99
- $ref: "#/parameters/version"
1010
produces:
11-
- application/json
11+
- text/plain
1212
tags:
1313
- Configuration
1414
responses:
@@ -25,20 +25,15 @@ configuration:
2525
description: Configuration file md5 checksum
2626
type: string
2727
schema:
28-
type: object
29-
required:
30-
- data
31-
properties:
32-
data:
33-
type: string
28+
type: string
3429
'default':
3530
$ref: '#/responses/DefaultError'
3631
post:
3732
summary: Push new haproxy configuration
3833
description: Push a new haproxy configuration file in plain text
3934
operationId: postHAProxyConfiguration
4035
produces:
41-
- application/json
36+
- text/plain
4237
consumes:
4338
- text/plain
4439
parameters:
@@ -106,7 +101,6 @@ configuration:
106101
type: string
107102
schema:
108103
type: string
109-
110104
'400':
111105
$ref: '#/responses/BadRequest'
112106
'default':

specification/paths/storage/general_files.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ general_files:
2626
name: file_upload
2727
type: file
2828
description: General use file content
29-
x-mimetype: text/plain
29+
x-mimetype: application/octet-stream
3030
tags:
3131
- Storage
3232
responses:
@@ -90,7 +90,7 @@ general_files_one:
9090
produces:
9191
- application/json
9292
consumes:
93-
- text/plain
93+
- multipart/form-data
9494
tags:
9595
- Storage
9696
parameters:
@@ -99,11 +99,11 @@ general_files_one:
9999
description: General use file storage_name
100100
required: true
101101
type: string
102-
- name: data
103-
in: body
104-
required: true
105-
schema:
106-
type: string
102+
- in: formData
103+
name: file_upload
104+
type: file
105+
description: General use file content
106+
x-mimetype: application/octet-stream
107107
- $ref: "#/parameters/skip_reload"
108108
- $ref: "#/parameters/force_reload"
109109
responses:

0 commit comments

Comments
 (0)