diff --git a/openapi/openapi.json b/openapi/openapi.json index 61d50e20..73f9306e 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -132,7 +132,7 @@ "/stakeholders/fdr/cache/schemas/v1" : { "get" : { "tags" : [ "Cache" ], - "summary" : "Get selected key of fdr v1 config", + "summary" : "Get selected key of cache v1 config", "operationId" : "cache_2", "parameters" : [ { "name" : "refresh", @@ -258,8 +258,8 @@ }, "/stakeholders/fdr/cache/schemas/v1/id" : { "get" : { - "tags" : [ "FdrCache" ], - "summary" : "Get last fdr v1 cache version", + "tags" : [ "Cache" ], + "summary" : "Get last v1 cache version", "operationId" : "idV1_1", "responses" : { "200" : { @@ -377,7 +377,7 @@ "/stakeholders/node/cache/schemas/v1" : { "get" : { "tags" : [ "Cache" ], - "summary" : "Get selected key of fdr v1 config", + "summary" : "Get selected key of cache v1 config", "operationId" : "cache_1", "parameters" : [ { "name" : "refresh", @@ -503,8 +503,8 @@ }, "/stakeholders/node/cache/schemas/v1/id" : { "get" : { - "tags" : [ "FdrCache" ], - "summary" : "Get last fdr v1 cache version", + "tags" : [ "Cache" ], + "summary" : "Get last v1 cache version", "operationId" : "idV1", "responses" : { "200" : { diff --git a/openapi/openapi_fdrv1.json b/openapi/openapi_fdrv1.json index c3046818..3de1eae7 100644 --- a/openapi/openapi_fdrv1.json +++ b/openapi/openapi_fdrv1.json @@ -25,7 +25,7 @@ "/stakeholders/fdr/cache/schemas/v1" : { "get" : { "tags" : [ "Cache" ], - "summary" : "Get selected key of fdr v1 config", + "summary" : "Get selected key of cache v1 config", "operationId" : "cache", "parameters" : [ { "name" : "refresh", @@ -48,18 +48,21 @@ } } ], "responses" : { - "400" : { - "description" : "Bad Request", + "403" : { + "description" : "Forbidden" + }, + "200" : { + "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "$ref" : "#/components/schemas/ConfigDataV1" } } } }, - "500" : { - "description" : "Service unavailable", + "400" : { + "description" : "Bad Request", "content" : { "application/json" : { "schema" : { @@ -68,24 +71,21 @@ } } }, - "200" : { - "description" : "OK", + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "500" : { + "description" : "Service unavailable", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ConfigDataV1" + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "401" : { - "description" : "Unauthorized" - }, - "403" : { - "description" : "Forbidden" - }, - "429" : { - "description" : "Too many requests" } }, "security" : [ { @@ -95,10 +95,16 @@ }, "/stakeholders/fdr/cache/schemas/v1/id" : { "get" : { - "tags" : [ "FdrCache" ], - "summary" : "Get last fdr v1 cache version", + "tags" : [ "Cache" ], + "summary" : "Get last v1 cache version", "operationId" : "idV1", "responses" : { + "404" : { + "description" : "Not Found" + }, + "403" : { + "description" : "Forbidden" + }, "400" : { "description" : "Bad Request", "content" : { @@ -109,12 +115,15 @@ } } }, - "500" : { - "description" : "Service unavailable", + "429" : { + "description" : "Too many requests" + }, + "200" : { + "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "$ref" : "#/components/schemas/CacheVersion" } } } @@ -122,24 +131,15 @@ "401" : { "description" : "Unauthorized" }, - "404" : { - "description" : "Not Found" - }, - "200" : { - "description" : "OK", + "500" : { + "description" : "Service unavailable", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CacheVersion" + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403" : { - "description" : "Forbidden" - }, - "429" : { - "description" : "Too many requests" } }, "security" : [ { @@ -150,28 +150,6 @@ }, "components" : { "schemas" : { - "ProblemJson" : { - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status" : { - "maximum" : 600, - "minimum" : 100, - "type" : "integer", - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format" : "int32", - "example" : 200 - }, - "detail" : { - "type" : "string", - "description" : "A human readable explanation specific to this occurrence of the problem.", - "example" : "There was an error processing the request" - } - } - }, "BrokerCreditorInstitution" : { "required" : [ "broker_code", "enabled", "extended_fault_bean" ], "type" : "object", @@ -1017,6 +995,28 @@ } } }, + "ProblemJson" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status" : { + "maximum" : 600, + "minimum" : 100, + "type" : "integer", + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format" : "int32", + "example" : 200 + }, + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" + } + } + }, "CacheVersion" : { "required" : [ "version" ], "type" : "object", diff --git a/openapi/openapi_nodev1.json b/openapi/openapi_nodev1.json index d02fa777..1e7a5543 100644 --- a/openapi/openapi_nodev1.json +++ b/openapi/openapi_nodev1.json @@ -25,7 +25,7 @@ "/stakeholders/node/cache/schemas/v1" : { "get" : { "tags" : [ "Cache" ], - "summary" : "Get selected key of fdr v1 config", + "summary" : "Get selected key of cache v1 config", "operationId" : "cache", "parameters" : [ { "name" : "refresh", @@ -48,18 +48,21 @@ } } ], "responses" : { - "400" : { - "description" : "Bad Request", + "403" : { + "description" : "Forbidden" + }, + "200" : { + "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "$ref" : "#/components/schemas/ConfigDataV1" } } } }, - "500" : { - "description" : "Service unavailable", + "400" : { + "description" : "Bad Request", "content" : { "application/json" : { "schema" : { @@ -68,24 +71,21 @@ } } }, - "200" : { - "description" : "OK", + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "500" : { + "description" : "Service unavailable", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ConfigDataV1" + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "401" : { - "description" : "Unauthorized" - }, - "403" : { - "description" : "Forbidden" - }, - "429" : { - "description" : "Too many requests" } }, "security" : [ { @@ -95,10 +95,16 @@ }, "/stakeholders/node/cache/schemas/v1/id" : { "get" : { - "tags" : [ "FdrCache" ], - "summary" : "Get last fdr v1 cache version", + "tags" : [ "Cache" ], + "summary" : "Get last v1 cache version", "operationId" : "idV1", "responses" : { + "404" : { + "description" : "Not Found" + }, + "403" : { + "description" : "Forbidden" + }, "400" : { "description" : "Bad Request", "content" : { @@ -109,12 +115,15 @@ } } }, - "500" : { - "description" : "Service unavailable", + "429" : { + "description" : "Too many requests" + }, + "200" : { + "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "$ref" : "#/components/schemas/CacheVersion" } } } @@ -122,24 +131,15 @@ "401" : { "description" : "Unauthorized" }, - "404" : { - "description" : "Not Found" - }, - "200" : { - "description" : "OK", + "500" : { + "description" : "Service unavailable", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CacheVersion" + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403" : { - "description" : "Forbidden" - }, - "429" : { - "description" : "Too many requests" } }, "security" : [ { @@ -150,28 +150,6 @@ }, "components" : { "schemas" : { - "ProblemJson" : { - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status" : { - "maximum" : 600, - "minimum" : 100, - "type" : "integer", - "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format" : "int32", - "example" : 200 - }, - "detail" : { - "type" : "string", - "description" : "A human readable explanation specific to this occurrence of the problem.", - "example" : "There was an error processing the request" - } - } - }, "BrokerCreditorInstitution" : { "required" : [ "broker_code", "enabled", "extended_fault_bean" ], "type" : "object", @@ -1017,6 +995,28 @@ } } }, + "ProblemJson" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status" : { + "maximum" : 600, + "minimum" : 100, + "type" : "integer", + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format" : "int32", + "example" : 200 + }, + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" + } + } + }, "CacheVersion" : { "required" : [ "version" ], "type" : "object", diff --git a/openapi/openapi_verifierv1.json b/openapi/openapi_verifierv1.json index 62b891ff..33f6484f 100644 --- a/openapi/openapi_verifierv1.json +++ b/openapi/openapi_verifierv1.json @@ -28,18 +28,21 @@ "summary" : "Get Creditor Institution list with Station v2", "operationId" : "cache", "responses" : { - "400" : { - "description" : "Bad Request", + "200" : { + "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "type" : "string" } } } }, - "500" : { - "description" : "Service unavailable", + "403" : { + "description" : "Forbidden" + }, + "400" : { + "description" : "Bad Request", "content" : { "application/json" : { "schema" : { @@ -48,24 +51,21 @@ } } }, - "200" : { - "description" : "OK", + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "500" : { + "description" : "Service unavailable", "content" : { "application/json" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "401" : { - "description" : "Unauthorized" - }, - "403" : { - "description" : "Forbidden" - }, - "429" : { - "description" : "Too many requests" } }, "security" : [ { diff --git a/src/main/java/it/gov/pagopa/apiconfig/cache/controller/CacheController.java b/src/main/java/it/gov/pagopa/apiconfig/cache/controller/CacheController.java index b7bc8286..82055027 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/cache/controller/CacheController.java +++ b/src/main/java/it/gov/pagopa/apiconfig/cache/controller/CacheController.java @@ -41,7 +41,7 @@ private void loadCacheFromRedis() { } @Operation( - summary = "Get selected key of fdr v1 config", + summary = "Get selected key of cache v1 config", security = {@SecurityRequirement(name = "ApiKey")}, tags = { "Cache", @@ -99,10 +99,10 @@ public ResponseEntity cache( } @Operation( - summary = "Get last fdr v1 cache version", + summary = "Get last v1 cache version", security = {@SecurityRequirement(name = "ApiKey")}, tags = { - "FdrCache", + "Cache", }) @ApiResponses( value = {