From d5ed230b2ca60629d71305966d2c690b7227da73 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:15:28 +0100 Subject: [PATCH] PAGOPA-1172 adding snippet to get description --- openapi/openapi_v1.json | 1571 ++++++++--------- openapi/openapi_v2.json | 769 ++++---- pom.xml | 7 + .../afm/calculator/OpenApiGenerationTest.java | 2 +- 4 files changed, 1162 insertions(+), 1187 deletions(-) diff --git a/openapi/openapi_v1.json b/openapi/openapi_v1.json index 30f59dca..62ee9e69 100644 --- a/openapi/openapi_v1.json +++ b/openapi/openapi_v1.json @@ -1,991 +1,988 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "@project.description@", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.3-1-PAGOPA-1172-sviluppo-carrello-multi-ente-definizione-interfacce-v-2" + "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.3-1-PAGOPA-1172-sviluppo-carrello-multi-ente-definizione-interfacce-v-2" }, - "servers": [ - { - "url": "http://localhost/", - "description": "Generated server url" + "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/" } - ], - "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": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + } ], + "paths" : { + "/actuator" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator root web endpoint", + "operationId" : "links", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + } + } } - } - } - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + } + } } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "429": { - "description": "Too many requests" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Link" + } + } } } } - }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "/actuator/health" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'health'", + "operationId" : "health", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "object" } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } } } } - }, - "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": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "/actuator/health/**" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'health-path'", + "operationId" : "health-path", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "object" } - } - } - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } } } - }, - "401": { - "description": "Unauthorized" - }, - "429": { - "description": "Too many requests" - }, - "404": { - "description": "Not Found", - "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/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } } } - }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "/actuator/metrics" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'metrics'", + "operationId" : "metrics", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } } } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "/actuator/metrics/{requiredMetricName}" : { + "get" : { + "tags" : [ "Actuator" ], + "summary" : "Actuator web endpoint 'metrics-requiredMetricName'", + "operationId" : "metrics-requiredMetricName", + "parameters" : [ { + "name" : "requiredMetricName", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.spring-boot.actuator.v3+json" : { + "schema" : { + "type" : "object" } } } } - }, - "security": [ - { - "ApiKey": [] - } - ] + } } }, - "/configuration/touchpoint/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deleteTouchpoints", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Touchpoint" + "/configuration/bundles/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addValidBundles", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ValidBundle" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/touchpoint/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addTouchpoints", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Touchpoint" + "/configuration/bundles/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deleteValidBundles", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ValidBundle" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/paymenttypes/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deletePaymentTypes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" + "/configuration/paymenttypes/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addPaymentTypes", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentType" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/paymenttypes/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addPaymentTypes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" + "/configuration/paymenttypes/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deletePaymentTypes", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentType" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/bundles/delete": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "deleteValidBundles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidBundle" + "/configuration/touchpoint/add" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "addTouchpoints", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Touchpoint" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/configuration/bundles/add": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "addValidBundles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidBundle" + "/configuration/touchpoint/delete" : { + "post" : { + "tags" : [ "Configuration" ], + "operationId" : "deleteTouchpoints", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Touchpoint" } } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "OK" + "responses" : { + "200" : { + "description" : "OK" } } } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "403": { - "description": "Forbidden" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } + "/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" } } }, - "401": { - "description": "Unauthorized" + "required" : true + }, + "responses" : { + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" + } + } + } }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "400" : { + "description" : "Bad 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" + "404" : { + "description" : "Not Found", + "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" - } - } + }, + "422" : { + "description" : "Unable to process the 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" + }, + "429" : { + "description" : "Too many requests" + }, + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } - } + }, + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/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" + "/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" } - }, - "application/vnd.spring-boot.actuator.v2+json": { - "schema": { - "type": "object" + } + } + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } - }, - "application/json": { - "schema": { - "type": "object" + } + } + }, + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" + }, + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } - } + }, + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/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" - } + "/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" } } - } - } - } - } - }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" }, - "idBrokerPsp": { - "type": "string" + "required" : true + }, + "responses" : { + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" + } + } + } }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } }, - "primaryCreditorInstitution": { - "type": "string" + "401" : { + "description" : "Unauthorized" }, - "paymentMethod": { - "type": "string" + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } }, - "touchpoint": { - "type": "string" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } + } }, - "bin": { - "type": "string" + "429" : { + "description" : "Too many requests" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" + } + } } } - } - }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + }, + "security" : [ { + "ApiKey" : [ ] + } ] + } + } + }, + "components" : { + "schemas" : { + "AppInfo" : { + "type" : "object", + "properties" : { + "environment" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "name" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "version" : { + "type" : "string" } } }, - "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)" + "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" + "bundleOptions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Transfer" } } } }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" - }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" + "CiBundle" : { + "type" : "object", + "properties" : { + "attributes" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CiBundleAttribute" + } }, - "paymentMethod": { - "type": "string" + "ciFiscalCode" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "id" : { + "type" : "string" + } + }, + "required" : [ "ciFiscalCode", "id" ] + }, + "CiBundleAttribute" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "maxPaymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "bundleName": { - "type": "string" + "transferCategory" : { + "type" : "string" }, - "bundleDescription": { - "type": "string" + "transferCategoryRelation" : { + "type" : "string", + "enum" : [ "EQUAL", "NOT_EQUAL" ] + } + }, + "required" : [ "id" ] + }, + "Link" : { + "type" : "object", + "properties" : { + "href" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "templated" : { + "type" : "boolean" + } + } + }, + "PaymentOption" : { + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" + } }, - "idChannel": { - "type": "string" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "idBrokerPsp": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "primaryCreditorInstitution" : { + "type" : "string" }, - "abi": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "pspBusinessName": { - "type": "string" - } - } - }, - "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" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" + } } - } + }, + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ] }, - "PaymentOption": { - "required": [ - "paymentAmount", - "primaryCreditorInstitution", - "transferList" - ], - "type": "object", - "properties": { - "paymentAmount": { - "type": "integer", - "format": "int64" + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" }, - "primaryCreditorInstitution": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "bin": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "touchpoint": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "idPspList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PspSearchCriteria" - } + "primaryCreditorInstitution" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "touchpoint" : { + "type" : "string" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } } }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" + "PaymentType" : { + "type" : "object", + "properties" : { + "createdDate" : { + "type" : "string", + "format" : "date-time" }, - "idChannel": { - "type": "string" + "id" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "ProblemJson" : { + "type" : "object", + "properties" : { + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" + }, + "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 + }, + "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" } } }, - "Touchpoint": { - "type": "object", - "properties": { - "id": { - "type": "string" + "PspSearchCriteria" : { + "type" : "object", + "properties" : { + "idBrokerPsp" : { + "type" : "string" }, - "name": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "creationDate": { - "type": "string", - "format": "date-time" + "idPsp" : { + "type" : "string" } - } + }, + "required" : [ "idPsp" ] }, - "PaymentType": { - "required": [ - "id", - "name" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "createdDate": { - "type": "string", - "format": "date-time" + "Touchpoint" : { + "type" : "object", + "properties" : { + "creationDate" : { + "type" : "string", + "format" : "date-time" + }, + "id" : { + "type" : "string" + }, + "name" : { + "type" : "string" } } }, - "CiBundle": { - "required": [ - "ciFiscalCode", - "id" - ], - "type": "object", - "properties": { - "id": { - "type": "string" + "Transfer" : { + "type" : "object", + "properties" : { + "abi" : { + "type" : "string" }, - "ciFiscalCode": { - "type": "string" + "bundleDescription" : { + "type" : "string" }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CiBundleAttribute" - } + "bundleName" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "idBundle" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "idCiBundle" : { + "type" : "string" + }, + "idPsp" : { + "type" : "string" + }, + "onUs" : { + "type" : "boolean" + }, + "paymentMethod" : { + "type" : "string" + }, + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" + }, + "pspBusinessName" : { + "type" : "string" + }, + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "touchpoint" : { + "type" : "string" } } }, - "CiBundleAttribute": { - "required": [ - "id" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "maxPaymentAmount": { - "type": "integer", - "format": "int64" - }, - "transferCategory": { - "type": "string" - }, - "transferCategoryRelation": { - "type": "string", - "enum": [ - "EQUAL", - "NOT_EQUAL" - ] + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" + }, + "digitalStamp" : { + "type" : "boolean" + }, + "transferCategory" : { + "type" : "string" } } }, - "ValidBundle": { - "required": [ - "digitalStamp", - "digitalStampRestriction" - ], - "type": "object", - "properties": { - "id": { - "type": "string" + "ValidBundle" : { + "type" : "object", + "properties" : { + "abi" : { + "type" : "string" }, - "idPsp": { - "type": "string" - }, - "abi": { - "type": "string" + "ciBundleList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CiBundle" + } }, - "pspBusinessName": { - "type": "string" + "description" : { + "type" : "string" }, - "name": { - "type": "string" + "digitalStamp" : { + "type" : "boolean" }, - "description": { - "type": "string" + "digitalStampRestriction" : { + "type" : "boolean" }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "id" : { + "type" : "string" }, - "minPaymentAmount": { - "type": "integer", - "format": "int64" + "idBrokerPsp" : { + "type" : "string" }, - "maxPaymentAmount": { - "type": "integer", - "format": "int64" + "idChannel" : { + "type" : "string" }, - "paymentType": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "maxPaymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "type": { - "type": "string", - "enum": [ - "GLOBAL", - "PUBLIC", - "PRIVATE" - ] + "minPaymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "transferCategoryList": { - "type": "array", - "items": { - "type": "string" - } + "name" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "onUs" : { + "type" : "boolean" }, - "idBrokerPsp": { - "type": "string" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "digitalStamp": { - "type": "boolean" + "paymentType" : { + "type" : "string" }, - "digitalStampRestriction": { - "type": "boolean" + "pspBusinessName" : { + "type" : "string" }, - "onUs": { - "type": "boolean" + "touchpoint" : { + "type" : "string" }, - "ciBundleList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CiBundle" + "transferCategoryList" : { + "type" : "array", + "items" : { + "type" : "string" } - } - } - }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" }, - "environment": { - "type": "string" + "type" : { + "type" : "string", + "enum" : [ "GLOBAL", "PUBLIC", "PRIVATE" ] } - } - }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "templated": { - "type": "boolean" - } - } + }, + "required" : [ "digitalStamp", "digitalStampRestriction" ] } }, - "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 99e24fad..0e5e498a 100644 --- a/openapi/openapi_v2.json +++ b/openapi/openapi_v2.json @@ -1,510 +1,481 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Calculator Logic", - "description": "@project.description@", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "2.10.3-1-PAGOPA-1172-sviluppo-carrello-multi-ente-definizione-interfacce-v-2" + "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.3-1-PAGOPA-1172-sviluppo-carrello-multi-ente-definizione-interfacce-v-2" }, - "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" : { + "/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/PaymentOptionByPsp" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaymentOption" } } }, - "required": true + "required" : true }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "responses" : { + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" }, - "429": { - "description": "Too many requests" - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "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" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "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" } } } } }, - "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" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentOption" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BundleOption" + "/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" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" }, - "429": { - "description": "Too many requests" + "403" : { + "description" : "Forbidden" }, - "404": { - "description": "Not Found", - "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" } } } + } + }, + "security" : [ { + "ApiKey" : [ ] + } ] + } + }, + "/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/PaymentOptionByPsp" + } + } }, - "422": { - "description": "Unable to process the request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "required" : true + }, + "responses" : { + "200" : { + "description" : "Ok", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleOption" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "health check", - "description": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "403": { - "description": "Forbidden" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + }, + "401" : { + "description" : "Unauthorized" + }, + "404" : { + "description" : "Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "422" : { + "description" : "Unable to process the request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" + "429" : { + "description" : "Too many requests" }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "PaymentOptionByPsp": { - "type": "object", - "properties": { - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" - }, - "paymentAmount": { - "type": "integer", - "format": "int64" + "components" : { + "schemas" : { + "AppInfo" : { + "type" : "object", + "properties" : { + "environment" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + } + }, + "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" + } + } + } + }, + "PaymentOption" : { + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" + }, + "idPspList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PspSearchCriteria" + } }, - "primaryCreditorInstitution": { - "type": "string" + "paymentAmount" : { + "type" : "integer", + "format" : "int64" }, - "paymentMethod": { - "type": "string" + "paymentMethod" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "bin": { - "type": "string" + "touchpoint" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" } } - } + }, + "required" : [ "paymentAmount", "primaryCreditorInstitution", "transferList" ] }, - "TransferListItem": { - "type": "object", - "properties": { - "creditorInstitution": { - "type": "string" + "PaymentOptionByPsp" : { + "type" : "object", + "properties" : { + "bin" : { + "type" : "string" + }, + "idBrokerPsp" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "paymentAmount" : { + "type" : "integer", + "format" : "int64" + }, + "paymentMethod" : { + "type" : "string" }, - "transferCategory": { - "type": "string" + "primaryCreditorInstitution" : { + "type" : "string" }, - "digitalStamp": { - "type": "boolean" + "touchpoint" : { + "type" : "string" + }, + "transferList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferListItem" + } } } }, - "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" - } + "ProblemJson" : { + "type" : "object", + "properties" : { + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" + }, + "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 + }, + "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" } } }, - "Transfer": { - "type": "object", - "properties": { - "taxPayerFee": { - "type": "integer", - "format": "int64" + "PspSearchCriteria" : { + "type" : "object", + "properties" : { + "idBrokerPsp" : { + "type" : "string" }, - "primaryCiIncurredFee": { - "type": "integer", - "format": "int64" + "idChannel" : { + "type" : "string" }, - "paymentMethod": { - "type": "string" + "idPsp" : { + "type" : "string" + } + }, + "required" : [ "idPsp" ] + }, + "Transfer" : { + "type" : "object", + "properties" : { + "abi" : { + "type" : "string" }, - "touchpoint": { - "type": "string" + "bundleDescription" : { + "type" : "string" }, - "idBundle": { - "type": "string" + "bundleName" : { + "type" : "string" }, - "bundleName": { - "type": "string" + "idBrokerPsp" : { + "type" : "string" }, - "bundleDescription": { - "type": "string" + "idBundle" : { + "type" : "string" }, - "idCiBundle": { - "type": "string" + "idChannel" : { + "type" : "string" }, - "idPsp": { - "type": "string" + "idCiBundle" : { + "type" : "string" }, - "idChannel": { - "type": "string" + "idPsp" : { + "type" : "string" }, - "idBrokerPsp": { - "type": "string" + "onUs" : { + "type" : "boolean" }, - "onUs": { - "type": "boolean" + "paymentMethod" : { + "type" : "string" }, - "abi": { - "type": "string" + "primaryCiIncurredFee" : { + "type" : "integer", + "format" : "int64" }, - "pspBusinessName": { - "type": "string" - } - } - }, - "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" - } - } - }, - "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" - } + "pspBusinessName" : { + "type" : "string" }, - "transferList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferListItem" - } - } - } - }, - "PspSearchCriteria": { - "required": [ - "idPsp" - ], - "type": "object", - "properties": { - "idPsp": { - "type": "string" - }, - "idChannel": { - "type": "string" - }, - "idBrokerPsp": { - "type": "string" + "taxPayerFee" : { + "type" : "integer", + "format" : "int64" + }, + "touchpoint" : { + "type" : "string" } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "TransferListItem" : { + "type" : "object", + "properties" : { + "creditorInstitution" : { + "type" : "string" }, - "version": { - "type": "string" + "digitalStamp" : { + "type" : "boolean" }, - "environment": { - "type": "string" + "transferCategory" : { + "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/pom.xml b/pom.xml index e725fae0..046c293b 100644 --- a/pom.xml +++ b/pom.xml @@ -176,6 +176,13 @@ + + + + src/test/resources + true + + org.springframework.boot 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 c30ce768..759dbe7e 100644 --- a/src/test/java/it/gov/pagopa/afm/calculator/OpenApiGenerationTest.java +++ b/src/test/java/it/gov/pagopa/afm/calculator/OpenApiGenerationTest.java @@ -30,7 +30,7 @@ class OpenApiGenerationTest { @Test void swaggerSpringPlugin() throws Exception { saveOpenAPI("/v3/api-docs/v1/", "openapi_v1.json"); - saveOpenAPI("/v3/api-docs/v2", "openapi_v2.json"); + saveOpenAPI("/v3/api-docs/v2/", "openapi_v2.json"); } private void saveOpenAPI(String fromUri, String toFile) throws Exception {