Skip to content

Commit

Permalink
Merge pull request #2 from swisscom/feature/28781-rfc-7807-compliant-…
Browse files Browse the repository at this point in the history
…error-responses

use actual problem json in wiremock responses
  • Loading branch information
rsteppac authored Jun 17, 2024
2 parents a494f86 + fe16f8f commit d154ae1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/wiremock/mappings/get_files_2345.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}"
}
}
]
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/wiremock/mappings/get_files_666.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/wiremock/mappings/push_files_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.\"}"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/wiremock/mappings/push_files_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/wiremock/mappings/push_files_666.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.\"}"
}
}
]
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ 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
############
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

0 comments on commit d154ae1

Please sign in to comment.