From 35576d34f9a360ce4d586d2660e0f6358386633e Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 12 Sep 2024 14:43:29 +0200 Subject: [PATCH] BUG/MAJOR: spec: change mimetypes for raw and general_storage endpoints --- specification/build/haproxy_spec.yaml | 25 ++++++++----------- specification/paths/configuration/raw.yaml | 12 +++------ .../paths/storage/general_files.yaml | 14 +++++------ 3 files changed, 20 insertions(+), 31 deletions(-) diff --git a/specification/build/haproxy_spec.yaml b/specification/build/haproxy_spec.yaml index 00549c85..70da54d5 100644 --- a/specification/build/haproxy_spec.yaml +++ b/specification/build/haproxy_spec.yaml @@ -21759,7 +21759,7 @@ paths: - $ref: '#/parameters/transaction_id' - $ref: '#/parameters/version' produces: - - application/json + - text/plain responses: "200": description: Operation successful @@ -21774,12 +21774,7 @@ paths: description: Configuration file version type: string schema: - properties: - data: - type: string - required: - - data - type: object + type: string default: $ref: '#/responses/DefaultError' summary: Return HAProxy configuration @@ -21822,7 +21817,7 @@ paths: - $ref: '#/parameters/version' - $ref: '#/parameters/force_reload' produces: - - application/json + - text/plain responses: "201": description: New HAProxy configuration pushed @@ -23142,7 +23137,7 @@ paths: in: formData name: file_upload type: file - x-mimetype: text/plain + x-mimetype: application/octet-stream responses: "201": description: General use file created with its contents @@ -23202,7 +23197,7 @@ paths: - Storage put: consumes: - - text/plain + - multipart/form-data description: Replaces the contents of a managed general use file on disk operationId: replaceStorageGeneralFile parameters: @@ -23211,11 +23206,11 @@ paths: name: name required: true type: string - - in: body - name: data - required: true - schema: - type: string + - description: General use file content + in: formData + name: file_upload + type: file + x-mimetype: application/octet-stream - $ref: '#/parameters/skip_reload' - $ref: '#/parameters/force_reload' produces: diff --git a/specification/paths/configuration/raw.yaml b/specification/paths/configuration/raw.yaml index 08886719..9f702057 100644 --- a/specification/paths/configuration/raw.yaml +++ b/specification/paths/configuration/raw.yaml @@ -8,7 +8,7 @@ configuration: - $ref: "#/parameters/transaction_id" - $ref: "#/parameters/version" produces: - - application/json + - text/plain tags: - Configuration responses: @@ -25,12 +25,7 @@ configuration: description: Configuration file md5 checksum type: string schema: - type: object - required: - - data - properties: - data: - type: string + type: string 'default': $ref: '#/responses/DefaultError' post: @@ -38,7 +33,7 @@ configuration: description: Push a new haproxy configuration file in plain text operationId: postHAProxyConfiguration produces: - - application/json + - text/plain consumes: - text/plain parameters: @@ -106,7 +101,6 @@ configuration: type: string schema: type: string - '400': $ref: '#/responses/BadRequest' 'default': diff --git a/specification/paths/storage/general_files.yaml b/specification/paths/storage/general_files.yaml index 1b1f0367..237ffe67 100644 --- a/specification/paths/storage/general_files.yaml +++ b/specification/paths/storage/general_files.yaml @@ -26,7 +26,7 @@ general_files: name: file_upload type: file description: General use file content - x-mimetype: text/plain + x-mimetype: application/octet-stream tags: - Storage responses: @@ -90,7 +90,7 @@ general_files_one: produces: - application/json consumes: - - text/plain + - multipart/form-data tags: - Storage parameters: @@ -99,11 +99,11 @@ general_files_one: description: General use file storage_name required: true type: string - - name: data - in: body - required: true - schema: - type: string + - in: formData + name: file_upload + type: file + description: General use file content + x-mimetype: application/octet-stream - $ref: "#/parameters/skip_reload" - $ref: "#/parameters/force_reload" responses: