From 02695c847d334a6e0bf88b88c5edbb272c6480f7 Mon Sep 17 00:00:00 2001 From: Felix Haller Date: Wed, 1 Sep 2021 15:45:43 +0200 Subject: [PATCH] produce application/json for dcga valuesets for proper encoding required for proper (utf-8) encoding when no accept header is set and plain/text is returned by default --- .../backend/verifier/ws/controller/DcgaController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ch-covidcertificate-backend-verifier/ch-covidcertificate-backend-verifier-ws/src/main/java/ch/admin/bag/covidcertificate/backend/verifier/ws/controller/DcgaController.java b/ch-covidcertificate-backend-verifier/ch-covidcertificate-backend-verifier-ws/src/main/java/ch/admin/bag/covidcertificate/backend/verifier/ws/controller/DcgaController.java index f8bcde9b..b23ebd0b 100644 --- a/ch-covidcertificate-backend-verifier/ch-covidcertificate-backend-verifier-ws/src/main/java/ch/admin/bag/covidcertificate/backend/verifier/ws/controller/DcgaController.java +++ b/ch-covidcertificate-backend-verifier/ch-covidcertificate-backend-verifier-ws/src/main/java/ch/admin/bag/covidcertificate/backend/verifier/ws/controller/DcgaController.java @@ -17,6 +17,7 @@ import java.security.NoSuchAlgorithmException; import org.springframework.http.CacheControl; import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -43,7 +44,7 @@ public DcgaController(ValueSetDataService valueSetDataService) { "404 => no value sets found for given valueSetId" }, responseHeaders = {"ETag:etag to set for next request:string"}) - @GetMapping(value = "/valueSets") + @GetMapping(value = "/valueSets", produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity getValueSets( WebRequest request, @RequestParam(