From 834e07a913e747af492457edddae3f578598290a Mon Sep 17 00:00:00 2001 From: Manuel Rafeli Date: Fri, 23 Aug 2024 16:10:57 +0200 Subject: [PATCH] docs: set problem+json error response of update status (#181) --- apps/user-ms/src/main/docs/openapi.json | 8 ++++---- apps/user-ms/src/main/docs/openapi.yaml | 8 ++++---- .../pagopa/selfcare/user/controller/UserController.java | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/user-ms/src/main/docs/openapi.json b/apps/user-ms/src/main/docs/openapi.json index cc7b74a0..99e9e842 100644 --- a/apps/user-ms/src/main/docs/openapi.json +++ b/apps/user-ms/src/main/docs/openapi.json @@ -831,7 +831,7 @@ "400" : { "description" : "Bad Request", "content" : { - "application/json" : { + "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } @@ -841,7 +841,7 @@ "401" : { "description" : "Not Authorized", "content" : { - "application/json" : { + "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } @@ -851,7 +851,7 @@ "403" : { "description" : "Forbidden", "content" : { - "application/json" : { + "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } @@ -861,7 +861,7 @@ "404" : { "description" : "Not Found", "content" : { - "application/json" : { + "application/problem+json" : { "schema" : { "$ref" : "#/components/schemas/Problem" } diff --git a/apps/user-ms/src/main/docs/openapi.yaml b/apps/user-ms/src/main/docs/openapi.yaml index bc9baffb..bf91b812 100644 --- a/apps/user-ms/src/main/docs/openapi.yaml +++ b/apps/user-ms/src/main/docs/openapi.yaml @@ -582,25 +582,25 @@ paths: "400": description: Bad Request content: - application/json: + application/problem+json: schema: $ref: "#/components/schemas/Problem" "401": description: Not Authorized content: - application/json: + application/problem+json: schema: $ref: "#/components/schemas/Problem" "403": description: Forbidden content: - application/json: + application/problem+json: schema: $ref: "#/components/schemas/Problem" "404": description: Not Found content: - application/json: + application/problem+json: schema: $ref: "#/components/schemas/Problem" security: diff --git a/apps/user-ms/src/main/java/it/pagopa/selfcare/user/controller/UserController.java b/apps/user-ms/src/main/java/it/pagopa/selfcare/user/controller/UserController.java index 2ccd21a4..2416426a 100644 --- a/apps/user-ms/src/main/java/it/pagopa/selfcare/user/controller/UserController.java +++ b/apps/user-ms/src/main/java/it/pagopa/selfcare/user/controller/UserController.java @@ -157,10 +157,10 @@ public Uni deleteProducts(@PathParam(value = "userId") String userId, @Operation(summary = "Update user status with optional filter for institution, product, role and productRole") @APIResponses(value = { @APIResponse(responseCode = "204", description = "No Content"), - @APIResponse(responseCode = "400", description = "Bad Request", content = @Content(schema = @Schema(implementation = Problem.class))), - @APIResponse(responseCode = "401", description = "Not Authorized", content = @Content(schema = @Schema(implementation = Problem.class))), - @APIResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(implementation = Problem.class))), - @APIResponse(responseCode = "404", description = "Not Found", content = @Content(schema = @Schema(implementation = Problem.class))) + @APIResponse(responseCode = "400", description = "Bad Request", content = @Content(schema = @Schema(implementation = Problem.class), mediaType = "application/problem+json")), + @APIResponse(responseCode = "401", description = "Not Authorized", content = @Content(schema = @Schema(implementation = Problem.class), mediaType = "application/problem+json")), + @APIResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(implementation = Problem.class), mediaType = "application/problem+json")), + @APIResponse(responseCode = "404", description = "Not Found", content = @Content(schema = @Schema(implementation = Problem.class), mediaType = "application/problem+json")) }) @PUT @Path(value = "/{id}/status")