1
0
mirror of https://github.com/pcvolkmer/mv64e-etl-processor synced 2025-09-13 17:02:52 +00:00

feat: show issue path if available in response body (#92)

This commit is contained in:
2025-04-04 13:59:51 +02:00
committed by GitHub
parent befeef3153
commit 033750eb10
3 changed files with 22 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import com.fasterxml.jackson.databind.JsonMappingException
import com.fasterxml.jackson.databind.ObjectMapper
import dev.dnpm.etl.processor.monitoring.ReportService.Issue
import dev.dnpm.etl.processor.monitoring.ReportService.Severity
import java.util.Optional
class ReportService(
private val objectMapper: ObjectMapper
@@ -57,7 +58,11 @@ class ReportService(
private data class DataQualityReport(val issues: List<Issue>)
@JsonIgnoreProperties(ignoreUnknown = true)
data class Issue(val severity: Severity, @JsonAlias("details") val message: String)
data class Issue(
val severity: Severity,
@JsonAlias("details") val message: String,
val path: Optional<String> = Optional.empty()
)
enum class Severity(@JsonValue val value: String) {
FATAL("fatal"),