diff --git a/openapi/openapi-node-v1.json b/openapi/openapi-node-v1.json index c3755642..415272f9 100644 --- a/openapi/openapi-node-v1.json +++ b/openapi/openapi-node-v1.json @@ -1,510 +1,481 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.22" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.22" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP", - "operationId": "getFeesByPsp", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP", + "operationId" : "getFeesByPsp", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPsp" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPsp" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP", - "operationId": "getFees", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP", + "operationId" : "getFees", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOption" + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOption" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "components" : { + "schemas" : { + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "primaryCreditorInstitution": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "bin": { - "type": "string" + "bin" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" } } }, - "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" + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" + "Transfer" : { + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "bundleName": { - "type": "string" + "bundleName" : { + "type" : "string" }, - "bundleDescription": { - "type": "string" + "bundleDescription" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" } } }, - "PaymentOption": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "PaymentOption" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi-node-v2.json b/openapi/openapi-node-v2.json index 1fd95180..efd7e4ae 100644 --- a/openapi/openapi-node-v2.json +++ b/openapi/openapi-node-v2.json @@ -1,548 +1,513 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.22" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.22" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP with ECs contributions", - "operationId": "getFeesByPspMulti", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP with ECs contributions", + "operationId" : "getFeesByPspMulti", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPspMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPspMulti" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP with ECs contributions", - "operationId": "getFeesMulti", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP with ECs contributions", + "operationId" : "getFeesMulti", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionMulti" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentNoticeItem": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "components" : { + "schemas" : { + "PaymentNoticeItem" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PaymentOptionByPspMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "PaymentOptionByPspMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" + } + } + }, + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Fee": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" - }, - "actualCiIncurredFee": { - "type": "integer", - "format": "int64" + "Fee" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" + }, + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualCiIncurredFee" : { + "type" : "integer", + "format" : "int64" } } }, - "Transfer": { - "required": [ - "fees" - ], - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" - }, - "actualPayerFee": { - "type": "integer", - "format": "int64" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "bundleName": { - "type": "string" - }, - "bundleDescription": { - "type": "string" - }, - "idsCiBundle": { - "type": "array", - "items": { - "type": "string" + "Transfer" : { + "required" : [ "fees" ], + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idBundle" : { + "type" : "string" + }, + "bundleName" : { + "type" : "string" + }, + "bundleDescription" : { + "type" : "string" + }, + "idsCiBundle" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" }, - "fees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Fee" + "fees" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Fee" } } } }, - "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" - } - } - }, - "PaymentOptionMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "PaymentOptionMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi-v1-dev-uat.json b/openapi/openapi-v1-dev-uat.json new file mode 100644 index 00000000..d1494777 --- /dev/null +++ b/openapi/openapi-v1-dev-uat.json @@ -0,0 +1,922 @@ +{ + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.22" + }, + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + }, { + "name" : "Configuration", + "description" : "Utility Services" + }, { + "name" : "Actuator", + "description" : "Monitor and interact", + "externalDocs" : { + "description" : "Spring Boot Actuator Web API Documentation", + "url" : "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" + } + } ], + "paths" : { + "/psps/{idPsp}/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP", + "operationId" : "getFeesByPsp", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPsp" + } + } + }, + "required" : true + }, + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" + } + } + } + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security" : [ { + "ApiKey" : [ ] + } ] + } + }, + "/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP", + "operationId" : "getFees", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOption" + } + } + }, + "required" : true + }, + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" + } + } + } + }, + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security" : [ { + "ApiKey" : [ ] + } ] + } + }, + "/configuration/touchpoint/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deleteTouchpoints", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Touchpoint" + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/configuration/touchpoint/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addTouchpoints", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Touchpoint" + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/configuration/paymenttypes/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deletePaymentTypes", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentType" + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/configuration/paymenttypes/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addPaymentTypes", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentType" + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/configuration/bundles/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deleteValidBundles", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ValidBundle" + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/configuration/bundles/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addValidBundles", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ValidBundle" + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "OK" + } + } + } + }, + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" + } + } + } + }, + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security" : [ { + "ApiKey" : [ ] + } ] + } + }, + "/actuator" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator root web endpoint", + "operationId" : "links", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + } + } + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + } + } + } + }, + "application/json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + } + } + } + } + } + } + } + } + }, + "/actuator/info" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'info'", + "operationId" : "info", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + } + } + } + } + } + }, + "/actuator/health" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'health'", + "operationId" : "health", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + } + } + } + } + } + }, + "/actuator/health/**" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'health-path'", + "operationId" : "health-path", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/json" : { + "schema" : { + "type" : "object" + } + } + } + } + } + } + } + }, + "components" : { + "schemas" : { + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" + } + } + } + }, + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" + }, + "transferCategory" : { + "type" : "string" + }, + "digitalStamp" : { + "type" : "boolean" + } + } + }, + "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" + } + } + }, + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" + } + } + } + }, + "Transfer" : { + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idBundle" : { + "type" : "string" + }, + "bundleName" : { + "type" : "string" + }, + "bundleDescription" : { + "type" : "string" + }, + "idCiBundle" : { + "type" : "string" + }, + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "onUs" : { + "type" : "boolean" + }, + "abi" : { + "type" : "string" + }, + "pspBusinessName" : { + "type" : "string" + } + } + }, + "PaymentOption" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" + } + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" + } + } + } + }, + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + } + } + }, + "Touchpoint" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "creationDate" : { + "type" : "string", + "format" : "date-time" + } + } + }, + "PaymentType" : { + "required" : [ "id", "name" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "createdDate" : { + "type" : "string", + "format" : "date-time" + } + } + }, + "CiBundle" : { + "required" : [ "ciFiscalCode", "id" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "ciFiscalCode" : { + "type" : "string" + }, + "attributes" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CiBundleAttribute" + } + } + } + }, + "CiBundleAttribute" : { + "required" : [ "id" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "maxPaymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "transferCategory" : { + "type" : "string" + }, + "transferCategoryRelation" : { + "type" : "string", + "enum" : [ "EQUAL", "NOT_EQUAL" ] + } + } + }, + "ValidBundle" : { + "required" : [ "digitalStamp", "digitalStampRestriction" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "idPsp" : { + "type" : "string" + }, + "abi" : { + "type" : "string" + }, + "pspBusinessName" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "minPaymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "maxPaymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "paymentType" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ "GLOBAL", "PUBLIC", "PRIVATE" ] + }, + "transferCategoryList" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "digitalStamp" : { + "type" : "boolean" + }, + "digitalStampRestriction" : { + "type" : "boolean" + }, + "onUs" : { + "type" : "boolean" + }, + "ciBundleList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CiBundle" + } + } + } + }, + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "environment" : { + "type" : "string" + } + } + }, + "Link" : { + "type" : "object", + "properties" : { + "href" : { + "type" : "string" + }, + "templated" : { + "type" : "boolean" + } + } + } + }, + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" + } + } + } +} \ No newline at end of file diff --git a/openapi/openapi-v1.json b/openapi/openapi-v1.json index db4e5317..415272f9 100644 --- a/openapi/openapi-v1.json +++ b/openapi/openapi-v1.json @@ -1,929 +1,481 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.22" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.22" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - }, - { - "name": "Configuration", - "description": "Utility Services" - }, - { - "name": "Actuator", - "description": "Monitor and interact", - "externalDocs": { - "description": "Spring Boot Actuator Web API Documentation", - "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/" - } - } - ], - "paths": { - "/psps/{idPsp}/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP", - "operationId": "getFeesByPsp", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP", + "operationId" : "getFeesByPsp", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPsp" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPsp" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP", - "operationId": "getFees", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP", + "operationId" : "getFees", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOption" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOption" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/configuration/touchpoint/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deleteTouchpoints", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Touchpoint" - } - } - } + "429" : { + "description" : "Too many requests" }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/configuration/touchpoint/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addTouchpoints", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Touchpoint" - } - } - } + "401" : { + "description" : "Unauthorized" }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/configuration/paymenttypes/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deletePaymentTypes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" } - } - } - }, - "/configuration/paymenttypes/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addPaymentTypes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" - } - } - } - }, - "required": true }, - "responses": { - "200": { - "description": "OK" - } - } + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/configuration/bundles/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deleteValidBundles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidBundle" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/configuration/bundles/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addValidBundles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidBundle" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" - } - } - } + "403" : { + "description" : "Forbidden" }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } + "429" : { + "description" : "Too many requests" }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } + "401" : { + "description" : "Unauthorized" }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/actuator": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator root web endpoint", - "operationId": "links", - "responses": { - "200": { - "description": "OK", - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } - } - }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - } + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } - } - } - }, - "/actuator/info": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'info'", - "operationId": "info", - "responses": { - "200": { - "description": "OK", - "content": { - "application/vnd.spring-boot.actuator.v3+json": { - "schema": { - "type": "object" - } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" - } - }, - "application/json": { - "schema": { - "type": "object" - } - } - } - } - } + }, + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" + "components" : { + "schemas" : { + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "primaryCreditorInstitution": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "bin": { - "type": "string" + "bin" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" } } }, - "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" + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" + "Transfer" : { + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "bundleName": { - "type": "string" + "bundleName" : { + "type" : "string" }, - "bundleDescription": { - "type": "string" + "bundleDescription" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" } } }, - "PaymentOption": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" - } + "PaymentOption" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" - } - } - } - }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - } - } - }, - "Touchpoint": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "creationDate": { - "type": "string", - "format": "date-time" - } - } - }, - "PaymentType": { - "required": [ - "id", - "name" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "createdDate": { - "type": "string", - "format": "date-time" - } - } - }, - "CiBundle": { - "required": [ - "ciFiscalCode", - "id" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "ciFiscalCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CiBundleAttribute" - } - } - } - }, - "CiBundleAttribute": { - "required": [ - "id" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "maxPaymentAmount": { - "type": "integer", - "format": "int64" - }, - "transferCategory": { - "type": "string" - }, - "transferCategoryRelation": { - "type": "string", - "enum": [ - "EQUAL", - "NOT_EQUAL" - ] - } - } - }, - "ValidBundle": { - "required": [ - "digitalStamp", - "digitalStampRestriction" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "idPsp": { - "type": "string" - }, - "abi": { - "type": "string" - }, - "pspBusinessName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "minPaymentAmount": { - "type": "integer", - "format": "int64" - }, - "maxPaymentAmount": { - "type": "integer", - "format": "int64" - }, - "paymentType": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "GLOBAL", - "PUBLIC", - "PRIVATE" - ] - }, - "transferCategoryList": { - "type": "array", - "items": { - "type": "string" - } - }, - "idChannel": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "bin" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "paymentMethod" : { + "type" : "string" }, - "digitalStampRestriction": { - "type": "boolean" + "touchpoint" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" + } }, - "ciBundleList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CiBundle" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "templated": { - "type": "boolean" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi-v2.json b/openapi/openapi-v2.json index 1fd95180..efd7e4ae 100644 --- a/openapi/openapi-v2.json +++ b/openapi/openapi-v2.json @@ -1,548 +1,513 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "Calculator Logic microservice for pagoPA AFM", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.22" + "openapi" : "3.0.1", + "info" : { + "title" : "PagoPA API Calculator Logic", + "description" : "Calculator Logic microservice for pagoPA AFM", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "2.10.22" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Calculator", - "description": "Everything about Calculator business logic" - } - ], - "paths": { - "/psps/{idPsp}/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of the specified idPSP with ECs contributions", - "operationId": "getFeesByPspMulti", - "parameters": [ - { - "name": "idPsp", - "in": "path", - "description": "PSP identifier", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "servers" : [ { + "url" : "http://localhost/", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Calculator", + "description" : "Everything about Calculator business logic" + } ], + "paths" : { + "/psps/{idPsp}/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of the specified idPSP with ECs contributions", + "operationId" : "getFeesByPspMulti", + "parameters" : [ { + "name" : "idPsp", + "in" : "path", + "description" : "PSP identifier", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionByPspMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionByPspMulti" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/fees/multi": { - "post": { - "tags": [ - "Calculator" - ], - "summary": "Get taxpayer fees of all or specified idPSP with ECs contributions", - "operationId": "getFeesMulti", - "parameters": [ - { - "name": "maxOccurrences", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "allCcp", - "in": "query", - "description": "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", - "required": false, - "schema": { - "type": "string", - "default": "true" - } + "/fees/multi" : { + "post" : { + "tags" : [ "Calculator" ], + "summary" : "Get taxpayer fees of all or specified idPSP with ECs contributions", + "operationId" : "getFeesMulti", + "parameters" : [ { + "name" : "maxOccurrences", + "in" : "query", + "required" : false, + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "allCcp", + "in" : "query", + "description" : "Flag for the exclusion of Poste bundles: false -> excluded, true or null -> included", + "required" : false, + "schema" : { + "type" : "string", + "default" : "true" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOptionMulti" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOptionMulti" } } }, - "required": true + "required" : true }, - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "429": { - "description": "Too many requests" - }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "health check", + "description" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" + }, + "401" : { + "description" : "Unauthorized" + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - }, - "403": { - "description": "Forbidden" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentNoticeItem": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" - }, - "primaryCreditorInstitution": { - "type": "string" - }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "components" : { + "schemas" : { + "PaymentNoticeItem" : { + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ], + "type" : "object", + "properties" : { + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "primaryCreditorInstitution" : { + "type" : "string" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PaymentOptionByPspMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "bin": { - "type": "string" - }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "PaymentOptionByPspMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "bin" : { + "type" : "string" + }, + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "digitalStamp" : { + "type" : "boolean" + } + } + }, + "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" } } }, - "BundleOption": { - "type": "object", - "properties": { - "belowThreshold": { - "type": "boolean", - "description": "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" - }, - "bundleOptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" + "BundleOption" : { + "type" : "object", + "properties" : { + "belowThreshold" : { + "type" : "boolean", + "description" : "if true (the payment amount is lower than the threshold value) the bundles onus is not calculated (always false)" + }, + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Fee": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" - }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" - }, - "actualCiIncurredFee": { - "type": "integer", - "format": "int64" + "Fee" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" + }, + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualCiIncurredFee" : { + "type" : "integer", + "format" : "int64" } } }, - "Transfer": { - "required": [ - "fees" - ], - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" - }, - "actualPayerFee": { - "type": "integer", - "format": "int64" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idBundle": { - "type": "string" - }, - "bundleName": { - "type": "string" - }, - "bundleDescription": { - "type": "string" - }, - "idsCiBundle": { - "type": "array", - "items": { - "type": "string" + "Transfer" : { + "required" : [ "fees" ], + "type" : "object", + "properties" : { + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "actualPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idBundle" : { + "type" : "string" + }, + "bundleName" : { + "type" : "string" + }, + "bundleDescription" : { + "type" : "string" + }, + "idsCiBundle" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "idPsp": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "onUs" : { + "type" : "boolean" }, - "abi": { - "type": "string" + "abi" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" + "pspBusinessName" : { + "type" : "string" }, - "fees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Fee" + "fees" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Fee" } } } }, - "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" - } - } - }, - "PaymentOptionMulti": { - "required": [ - "paymentNotice" - ], - "type": "object", - "properties": { - "bin": { - "type": "string" - }, - "paymentMethod": { - "type": "string" - }, - "touchpoint": { - "type": "string" - }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" + "PaymentOptionMulti" : { + "required" : [ "paymentNotice" ], + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "touchpoint" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" } }, - "paymentNotice": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNoticeItem" + "paymentNotice" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNoticeItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "PspSearchCriteria" : { + "required" : [ "idPsp" ], + "type" : "object", + "properties" : { + "idPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 0e92d194..9469ce52 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -28,6 +28,9 @@ springdoc.group-configs[2].paths-to-match=/**/fees,/info springdoc.group-configs[3].group=node_v2 springdoc.group-configs[3].displayName=API AFM-Calculator for node v2 springdoc.group-configs[3].paths-to-match=/**/multi,/info +springdoc.group-configs[4].group=v1_prod +springdoc.group-configs[4].displayName=API AFM-Calculator v1 Production +springdoc.group-configs[4].paths-to-match=/**/fees,/info # Server server.servlet.context-path=/ diff --git a/src/test/java/it/gov/pagopa/afm/calculator/OpenApiGenerationTest.java b/src/test/java/it/gov/pagopa/afm/calculator/OpenApiGenerationTest.java index 3030b466..187514f5 100644 --- a/src/test/java/it/gov/pagopa/afm/calculator/OpenApiGenerationTest.java +++ b/src/test/java/it/gov/pagopa/afm/calculator/OpenApiGenerationTest.java @@ -29,10 +29,11 @@ class OpenApiGenerationTest { @Test void swaggerSpringPlugin() throws Exception { - saveOpenAPI("/v3/api-docs/v1/", "openapi-v1.json"); + saveOpenAPI("/v3/api-docs/v1/", "openapi-v1-dev-uat.json"); saveOpenAPI("/v3/api-docs/v2/", "openapi-v2.json"); saveOpenAPI("/v3/api-docs/node_v1/", "openapi-node-v1.json"); saveOpenAPI("/v3/api-docs/node_v2/", "openapi-node-v2.json"); + saveOpenAPI("/v3/api-docs/v1_prod/", "openapi-v1.json"); } private void saveOpenAPI(String fromUri, String toFile) throws Exception { diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index 81e6d75a..124a5a7f 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -38,7 +38,7 @@ azure.storage.connection=AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqF table.issuer-range=issuerrangetable # Business config -payment.amount.threshold=0 +payment.amount.threshold=0 # PSP Poste pspPoste.id=testIdPspPoste @@ -62,3 +62,6 @@ springdoc.group-configs[2].paths-to-match=/**/fees,/info springdoc.group-configs[3].group=node_v2 springdoc.group-configs[3].displayName=API AFM-Calculator for node v2 springdoc.group-configs[3].paths-to-match=/**/multi,/info +springdoc.group-configs[4].group=v1_prod +springdoc.group-configs[4].displayName=API AFM-Calculator v1 Production +springdoc.group-configs[4].paths-to-match=/**/fees,/info