From 8b572881aad1df96e2d6f413b22b4ca33e7e3551 Mon Sep 17 00:00:00 2001 From: jsteenke <146953549+jsteenke@users.noreply.github.com> Date: Fri, 16 Feb 2024 09:33:24 +0100 Subject: [PATCH] feat: size up image length (#35) --- src/main/openapi/onecx-image-internal-openapi.yaml | 10 +++++----- src/main/openapi/onecx-theme-v1.yaml | 2 +- .../internal/controllers/ImageRestControllerTest.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/openapi/onecx-image-internal-openapi.yaml b/src/main/openapi/onecx-image-internal-openapi.yaml index c6586be..060b197 100644 --- a/src/main/openapi/onecx-image-internal-openapi.yaml +++ b/src/main/openapi/onecx-image-internal-openapi.yaml @@ -19,7 +19,7 @@ paths: required: true schema: minimum: 1 - maximum: 20000 + maximum: 110000 type: integer - name: refId in: path @@ -38,7 +38,7 @@ paths: image/*: schema: minimum: 1 - maximum: 20000 + maximum: 110000 type: string format: binary responses: @@ -73,7 +73,7 @@ paths: image/*: schema: minimum: 1 - maximum: 20000 + maximum: 110000 type: string format: binary "400": @@ -93,7 +93,7 @@ paths: schema: type: integer minimum: 1 - maximum: 20000 + maximum: 110000 - name: refId in: path required: true @@ -110,7 +110,7 @@ paths: image/*: schema: minimum: 1 - maximum: 20000 + maximum: 110000 type: string format: binary responses: diff --git a/src/main/openapi/onecx-theme-v1.yaml b/src/main/openapi/onecx-theme-v1.yaml index 5c7d3a2..533ff0c 100644 --- a/src/main/openapi/onecx-theme-v1.yaml +++ b/src/main/openapi/onecx-theme-v1.yaml @@ -63,7 +63,7 @@ paths: image/*: schema: minimum: 1 - maximum: 20000 + maximum: 110000 type: string format: binary 404: diff --git a/src/test/java/org/tkit/onecx/theme/rs/internal/controllers/ImageRestControllerTest.java b/src/test/java/org/tkit/onecx/theme/rs/internal/controllers/ImageRestControllerTest.java index f07dfe0..af7ccae 100644 --- a/src/test/java/org/tkit/onecx/theme/rs/internal/controllers/ImageRestControllerTest.java +++ b/src/test/java/org/tkit/onecx/theme/rs/internal/controllers/ImageRestControllerTest.java @@ -261,7 +261,7 @@ void testMaxUploadSize() { var refId = "themeMaxUpload"; - byte[] body = new byte[20001]; + byte[] body = new byte[110001]; new Random().nextBytes(body); var exception = given() @@ -277,7 +277,7 @@ void testMaxUploadSize() { assertThat(exception.getErrorCode()).isEqualTo(CONSTRAINT_VIOLATIONS.name()); assertThat(exception.getDetail()).isEqualTo( - "uploadImage.contentLength: must be less than or equal to 20000"); + "uploadImage.contentLength: must be less than or equal to 110000"); } }