From 0ed53a4778282bd288622133bc5d6fec27b3c0be Mon Sep 17 00:00:00 2001 From: Ralf Steppacher Date: Mon, 17 Jun 2024 16:57:37 +0200 Subject: [PATCH] #28781 use actual problem json in wiremock responses --- build.gradle.kts | 8 ++++++++ docker-compose/wiremock/mappings/get_files_2345.json | 5 +++-- docker-compose/wiremock/mappings/get_files_666.json | 5 +++-- docker-compose/wiremock/mappings/push_files_1.json | 2 +- docker-compose/wiremock/mappings/push_files_5.json | 2 +- docker-compose/wiremock/mappings/push_files_666.json | 2 +- gradle.properties | 10 +++++----- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7183e09..e384aea 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,6 +28,14 @@ plugins { // KAPT is end of life, but KSP is not supported yet: https://github.com/spring-projects/spring-boot/issues/28046 kotlin("kapt") `maven-publish` + idea +} + +idea { + module { + isDownloadJavadoc = true + isDownloadSources = true + } } application { diff --git a/docker-compose/wiremock/mappings/get_files_2345.json b/docker-compose/wiremock/mappings/get_files_2345.json index daf0c61..f2f9ad8 100644 --- a/docker-compose/wiremock/mappings/get_files_2345.json +++ b/docker-compose/wiremock/mappings/get_files_2345.json @@ -43,8 +43,9 @@ "response": { "status": 500, "headers": { - "Content-Type": "*/*" - } + "Content-Type": "application/problem+json; charset=utf-8" + }, + "body": "{\"type\":\"about:blank\",\"title\":\"Internal Server Error\",\"status\":500,\"detail\":\"This will alternate with OK responses\"}" } } ] diff --git a/docker-compose/wiremock/mappings/get_files_666.json b/docker-compose/wiremock/mappings/get_files_666.json index aa16b77..322b06e 100644 --- a/docker-compose/wiremock/mappings/get_files_666.json +++ b/docker-compose/wiremock/mappings/get_files_666.json @@ -22,8 +22,9 @@ "response": { "status": 500, "headers": { - "Content-Type": "*/*" - } + "Content-Type": "application/problem+json; charset=utf-8" + }, + "body": "{\"type\":\"about:blank\",\"title\":\"Internal Server Error\",\"status\":500,\"detail\":\"This will be repeated endlessly\"}" } } ] diff --git a/docker-compose/wiremock/mappings/push_files_1.json b/docker-compose/wiremock/mappings/push_files_1.json index 22b5d1e..9a6577e 100644 --- a/docker-compose/wiremock/mappings/push_files_1.json +++ b/docker-compose/wiremock/mappings/push_files_1.json @@ -20,7 +20,7 @@ "headers": { "Content-Type": "application/problem+json; charset=utf-8" }, - "body": "{\"message\": \"Invalid input.\"}" + "body": "{\"type\":\"about:blank\",\"title\":\"Bad Request\",\"status\":400,\"detail\":\"Invalid input.\"}" } }, { diff --git a/docker-compose/wiremock/mappings/push_files_5.json b/docker-compose/wiremock/mappings/push_files_5.json index 57f3934..54b8dd0 100644 --- a/docker-compose/wiremock/mappings/push_files_5.json +++ b/docker-compose/wiremock/mappings/push_files_5.json @@ -15,7 +15,7 @@ "headers": { "Content-Type": "application/problem+json; charset=utf-8" }, - "body": "{\"message\": \"This will be repeated endlessly.\"}" + "body": "{\"type\":\"about:blank\",\"title\":\"Internal Server Error\",\"status\":500,\"detail\":\"This will be repeated endlessly\"}" } } ] diff --git a/docker-compose/wiremock/mappings/push_files_666.json b/docker-compose/wiremock/mappings/push_files_666.json index 0bfa30c..ccd53be 100644 --- a/docker-compose/wiremock/mappings/push_files_666.json +++ b/docker-compose/wiremock/mappings/push_files_666.json @@ -15,7 +15,7 @@ "headers": { "Content-Type": "application/problem+json; charset=utf-8" }, - "body": "{\"message\": \"The user is not authorized.\"}" + "body": "{\"type\":\"about:blank\",\"title\":\"Forbidden\",\"status\":403,\"detail\":\"The user is not authorized.\"}" } } ] diff --git a/gradle.properties b/gradle.properties index 4ff6fea..adab95a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,8 +12,8 @@ kotlinxSerializationVersion=1.6.3 # Plugins ############ detektVersion=1.23.6 -springBootVersion=3.2.4 -springDependencyManagementVersion=1.1.4 +springBootVersion=3.3.0 +springDependencyManagementVersion=1.1.5 ############ # Dependencies ############ @@ -21,6 +21,6 @@ detektKotlinVersion=1.9.23 jacocoVersion=0.8.12 kotlinLoggingVersion=6.0.9 logstashEncoderVersion=7.4 -micrometerTracingVersion=1.3.0 -mockkVersion=1.13.10 -springCloudVersion=2023.0.1 +micrometerTracingVersion=1.3.1 +mockkVersion=1.13.11 +springCloudVersion=2023.0.2