From 406adef32ceab7eae3925b2952f3f3695e5102fd Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 11:18:39 +0200 Subject: [PATCH 01/14] prop --- src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index a6e5e8e..db59993 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -9,7 +9,7 @@ spring.datasource.url=${ORACLE_PM_DB_URL} spring.datasource.username=${ORACLE_PM_DB_USER} spring.datasource.password=${ORACLE_PM_DB_PWD} spring.datasource.driver-class-name=oracle.jdbc.OracleDriver -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect + # CosmosDB Database settings azure.cosmos.uri=${COSMOS_DB_URI} azure.cosmos.key=${COSMOS_DB_PRIMARY_KEY} @@ -22,7 +22,7 @@ azure.cosmos.biz-events-view-cart-container-name=${COSMOS_DB_VIEW_CART_CONTAINER spring.jpa.hibernate.use-new-id-generator-mappings=false spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.default_schema=${ORACLE_SCHEMA} -spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect +#spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect cron.job.schedule.card.enabled=false cron.job.schedule.card.expression=- # Actuator From 5f0838aec9b7407eb60ba4a32a4fdf41391a0c38 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Fri, 13 Sep 2024 09:20:28 +0000 Subject: [PATCH 02/14] Bump to version 1.0.2-1-fix-deploy [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index bf7b18f..462c448 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-afm-calculator description: Microservice that handles calculation for pagoPA Advanced Fees Management type: application -version: 0.14.0 -appVersion: 1.0.2 +version: 0.15.0 +appVersion: 1.0.2-1-fix-deploy dependencies: - name: microservice-chart version: 5.9.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 20ce7bc..feb7320 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2" + tag: "1.0.2-1-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 0fa3710..59c08ad 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2" + tag: "1.0.2-1-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index e639457..3b14274 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2" + tag: "1.0.2-1-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index 2c8a389..e521b9f 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.1", "info": { "title": "OpenAPI definition", - "version": "1.0.2" + "version": "1.0.2-1-fix-deploy" }, "servers": [ { diff --git a/pom.xml b/pom.xml index ba1bc23..baf5733 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa bizpmingestion - 1.0.2 + 1.0.2-1-fix-deploy Biz PM Ingestion Microservice for retrieving payment receipts from the PM. From ab3c225cb68b1727432ee4b81a29ffa8dbaf4a4f Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 11:27:06 +0200 Subject: [PATCH 03/14] try2 --- src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index db59993..8e110c2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -9,7 +9,7 @@ spring.datasource.url=${ORACLE_PM_DB_URL} spring.datasource.username=${ORACLE_PM_DB_USER} spring.datasource.password=${ORACLE_PM_DB_PWD} spring.datasource.driver-class-name=oracle.jdbc.OracleDriver - +#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect # CosmosDB Database settings azure.cosmos.uri=${COSMOS_DB_URI} azure.cosmos.key=${COSMOS_DB_PRIMARY_KEY} @@ -22,7 +22,7 @@ azure.cosmos.biz-events-view-cart-container-name=${COSMOS_DB_VIEW_CART_CONTAINER spring.jpa.hibernate.use-new-id-generator-mappings=false spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.default_schema=${ORACLE_SCHEMA} -#spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect +spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect cron.job.schedule.card.enabled=false cron.job.schedule.card.expression=- # Actuator From 21dddb7afd618f840321dce588c63abae3ea93e4 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Fri, 13 Sep 2024 09:28:42 +0000 Subject: [PATCH 04/14] Bump to version 1.0.2-2-fix-deploy [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 462c448..4374150 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-afm-calculator description: Microservice that handles calculation for pagoPA Advanced Fees Management type: application -version: 0.15.0 -appVersion: 1.0.2-1-fix-deploy +version: 0.16.0 +appVersion: 1.0.2-2-fix-deploy dependencies: - name: microservice-chart version: 5.9.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index feb7320..e139855 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-1-fix-deploy" + tag: "1.0.2-2-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 59c08ad..35fc03f 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-1-fix-deploy" + tag: "1.0.2-2-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 3b14274..0d06135 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-1-fix-deploy" + tag: "1.0.2-2-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index e521b9f..a6f8031 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.1", "info": { "title": "OpenAPI definition", - "version": "1.0.2-1-fix-deploy" + "version": "1.0.2-2-fix-deploy" }, "servers": [ { diff --git a/pom.xml b/pom.xml index baf5733..5ba9dff 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa bizpmingestion - 1.0.2-1-fix-deploy + 1.0.2-2-fix-deploy Biz PM Ingestion Microservice for retrieving payment receipts from the PM. From 2005385d4e28f7e59bce41ad0e5344a80663f706 Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 11:35:05 +0200 Subject: [PATCH 05/14] rollback --- src/main/resources/application.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8e110c2..f59429f 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -9,7 +9,7 @@ spring.datasource.url=${ORACLE_PM_DB_URL} spring.datasource.username=${ORACLE_PM_DB_USER} spring.datasource.password=${ORACLE_PM_DB_PWD} spring.datasource.driver-class-name=oracle.jdbc.OracleDriver -#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect # CosmosDB Database settings azure.cosmos.uri=${COSMOS_DB_URI} azure.cosmos.key=${COSMOS_DB_PRIMARY_KEY} @@ -43,4 +43,3 @@ logging.level.root=${DEFAULT_LOGGING_LEVEL:INFO} logging.level.it.gov.pagopa=${APP_LOGGING_LEVEL:INFO} # CORS configuration cors.configuration=${CORS_CONFIGURATION:'{"origins": ["*"], "methods": ["*"]}'} - From d4b60840e7fbe48a553cb057390fd3e850143662 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Fri, 13 Sep 2024 09:36:13 +0000 Subject: [PATCH 06/14] Bump to version 1.0.2-3-fix-deploy [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 4374150..a322dad 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-afm-calculator description: Microservice that handles calculation for pagoPA Advanced Fees Management type: application -version: 0.16.0 -appVersion: 1.0.2-2-fix-deploy +version: 0.17.0 +appVersion: 1.0.2-3-fix-deploy dependencies: - name: microservice-chart version: 5.9.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index e139855..b65c933 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-2-fix-deploy" + tag: "1.0.2-3-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 35fc03f..07805d1 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-2-fix-deploy" + tag: "1.0.2-3-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 0d06135..3bf630a 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-2-fix-deploy" + tag: "1.0.2-3-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index a6f8031..abce3ee 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.1", "info": { "title": "OpenAPI definition", - "version": "1.0.2-2-fix-deploy" + "version": "1.0.2-3-fix-deploy" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 5ba9dff..97ad468 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa bizpmingestion - 1.0.2-2-fix-deploy + 1.0.2-3-fix-deploy Biz PM Ingestion Microservice for retrieving payment receipts from the PM. From a9cd6829755f9b18bf6637fc55f7c0d3804e9eab Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 11:42:53 +0200 Subject: [PATCH 07/14] try4 --- helm/values-dev.yaml | 8 ++++---- src/main/resources/application.properties | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index e139855..7c17bf9 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -10,16 +10,16 @@ microservice-chart: httpGet: path: /actuator/health/liveness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 120 failureThreshold: 6 - periodSeconds: 10 + periodSeconds: 30 readinessProbe: httpGet: path: /actuator/health/readiness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 120 failureThreshold: 6 - periodSeconds: 10 + periodSeconds: 30 deployment: create: true service: diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f59429f..4bd44d9 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -10,6 +10,7 @@ spring.datasource.username=${ORACLE_PM_DB_USER} spring.datasource.password=${ORACLE_PM_DB_PWD} spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect +spring.jpa.properties.hibernate.boot.allow_jdbc_metadata_access=false # CosmosDB Database settings azure.cosmos.uri=${COSMOS_DB_URI} azure.cosmos.key=${COSMOS_DB_PRIMARY_KEY} @@ -21,6 +22,7 @@ azure.cosmos.biz-events-view-cart-container-name=${COSMOS_DB_VIEW_CART_CONTAINER # JPA settings spring.jpa.hibernate.use-new-id-generator-mappings=false spring.jpa.hibernate.ddl-auto=none +spring.sql.init.mode=never spring.jpa.properties.hibernate.default_schema=${ORACLE_SCHEMA} spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect cron.job.schedule.card.enabled=false From 5fd262fe6111d1bba049339d3b82e4e5cf2a4023 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Fri, 13 Sep 2024 09:44:07 +0000 Subject: [PATCH 08/14] Bump to version 1.0.2-4-fix-deploy [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index a322dad..ffb0e89 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-afm-calculator description: Microservice that handles calculation for pagoPA Advanced Fees Management type: application -version: 0.17.0 -appVersion: 1.0.2-3-fix-deploy +version: 0.18.0 +appVersion: 1.0.2-4-fix-deploy dependencies: - name: microservice-chart version: 5.9.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 186f3e4..6824dc8 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-3-fix-deploy" + tag: "1.0.2-4-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 07805d1..9e8a1fb 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-3-fix-deploy" + tag: "1.0.2-4-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 3bf630a..f8198f9 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-3-fix-deploy" + tag: "1.0.2-4-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index abce3ee..8ffb897 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.1", "info": { "title": "OpenAPI definition", - "version": "1.0.2-3-fix-deploy" + "version": "1.0.2-4-fix-deploy" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 97ad468..0e88910 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa bizpmingestion - 1.0.2-3-fix-deploy + 1.0.2-4-fix-deploy Biz PM Ingestion Microservice for retrieving payment receipts from the PM. From 628cfe3d965b34b2f6e8cd10af1a9713e86f4968 Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 11:54:06 +0200 Subject: [PATCH 09/14] helm --- helm/values-dev.yaml | 12 ++++++------ helm/values-prod.yaml | 18 +++++++++--------- helm/values-uat.yaml | 18 +++++++++--------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 186f3e4..ba8e288 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -10,14 +10,14 @@ microservice-chart: httpGet: path: /actuator/health/liveness port: 8080 - initialDelaySeconds: 120 + initialDelaySeconds: 180 failureThreshold: 6 periodSeconds: 30 readinessProbe: httpGet: path: /actuator/health/readiness port: 8080 - initialDelaySeconds: 120 + initialDelaySeconds: 180 failureThreshold: 6 periodSeconds: 30 deployment: @@ -49,14 +49,14 @@ microservice-chart: resources: requests: memory: "512Mi" - cpu: "0.25" + cpu: "0.3" limits: - memory: "512Mi" - cpu: "0.25" + memory: "1024Mi" + cpu: "0.5" autoscaling: enable: true minReplica: 1 - maxReplica: 10 + maxReplica: 1 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds triggers: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 07805d1..9bb75dc 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -10,16 +10,16 @@ microservice-chart: httpGet: path: /actuator/health/liveness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 180 failureThreshold: 6 - periodSeconds: 10 + periodSeconds: 30 readinessProbe: httpGet: path: /actuator/health/readiness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 180 failureThreshold: 6 - periodSeconds: 10 + periodSeconds: 30 deployment: create: true service: @@ -49,14 +49,14 @@ microservice-chart: resources: requests: memory: "512Mi" - cpu: "0.25" + cpu: "0.5" limits: - memory: "512Mi" - cpu: "0.25" + memory: "2048Mi" + cpu: "1.0" autoscaling: enable: true - minReplica: 3 - maxReplica: 10 + minReplica: 1 + maxReplica: 1 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds triggers: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 3bf630a..bd2ab1b 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -10,16 +10,16 @@ microservice-chart: httpGet: path: /actuator/health/liveness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 180 failureThreshold: 6 - periodSeconds: 10 + periodSeconds: 30 readinessProbe: httpGet: path: /actuator/health/readiness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 180 failureThreshold: 6 - periodSeconds: 10 + periodSeconds: 30 deployment: create: true service: @@ -49,14 +49,14 @@ microservice-chart: resources: requests: memory: "512Mi" - cpu: "0.25" + cpu: "0.3" limits: - memory: "512Mi" - cpu: "0.25" + memory: "1024Mi" + cpu: "0.7" autoscaling: enable: true - minReplica: 3 - maxReplica: 10 + minReplica: 1 + maxReplica: 1 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds triggers: From e6b2117c63b5982a1bc64c86dd7a54c5f1242692 Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 11:58:44 +0200 Subject: [PATCH 10/14] helm --- helm/values-dev.yaml | 4 ++-- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index ffe3d24..cdc0703 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -78,8 +78,8 @@ microservice-chart: COSMOS_DB_VIEW_GENERAL_CONTAINER_NAME: 'biz-events-view-general' COSMOS_DB_VIEW_CART_CONTAINER_NAME: 'biz-events-view-cart' COSMOS_QUERY_METRICS: 'false' - ORACLE_PM_DB_USER: 'PAGOPA_READER' - ORACLE_SCHEMA: 'AGID_USER' + ORACLE_PM_DB_USER: 'AGID_USER' + ORACLE_SCHEMA: 'AGIDT' OTEL_SERVICE_NAME: 'pagopabizpmingestion' OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=dev" OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317" diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 6fcb869..3983cd0 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -79,7 +79,7 @@ microservice-chart: COSMOS_DB_VIEW_CART_CONTAINER_NAME: 'biz-events-view-cart' COSMOS_QUERY_METRICS: 'false' ORACLE_PM_DB_USER: 'PAGOPA_READER' - ORACLE_SCHEMA: 'AGID_USER' + ORACLE_SCHEMA: 'PAGOPA_READ' OTEL_SERVICE_NAME: 'pagopabizpmingestion' OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=prod" OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317" diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 2df2787..a1a0f01 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -78,8 +78,8 @@ microservice-chart: COSMOS_DB_VIEW_GENERAL_CONTAINER_NAME: 'biz-events-view-general' COSMOS_DB_VIEW_CART_CONTAINER_NAME: 'biz-events-view-cart' COSMOS_QUERY_METRICS: 'false' - ORACLE_PM_DB_USER: 'PAGOPA_READER' - ORACLE_SCHEMA: 'AGID_USER' + ORACLE_PM_DB_USER: 'AGID_USER' + ORACLE_SCHEMA: 'AGIDA' OTEL_SERVICE_NAME: 'pagopabizpmingestion' OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=uat" OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317" From 421512cee595368bd560c464a71d9c951bbd52d8 Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 12:02:53 +0200 Subject: [PATCH 11/14] fix dev --- helm/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index cdc0703..9e8e2aa 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -79,7 +79,7 @@ microservice-chart: COSMOS_DB_VIEW_CART_CONTAINER_NAME: 'biz-events-view-cart' COSMOS_QUERY_METRICS: 'false' ORACLE_PM_DB_USER: 'AGID_USER' - ORACLE_SCHEMA: 'AGIDT' + ORACLE_SCHEMA: 'AGID_USER' OTEL_SERVICE_NAME: 'pagopabizpmingestion' OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=dev" OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317" From d4f899a0f7c7c91efaa1c3e271b89ef0de0c552c Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 12:04:19 +0200 Subject: [PATCH 12/14] fix helm --- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 3983cd0..6fcb869 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -79,7 +79,7 @@ microservice-chart: COSMOS_DB_VIEW_CART_CONTAINER_NAME: 'biz-events-view-cart' COSMOS_QUERY_METRICS: 'false' ORACLE_PM_DB_USER: 'PAGOPA_READER' - ORACLE_SCHEMA: 'PAGOPA_READ' + ORACLE_SCHEMA: 'AGID_USER' OTEL_SERVICE_NAME: 'pagopabizpmingestion' OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=prod" OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317" diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index a1a0f01..1a9499b 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -79,7 +79,7 @@ microservice-chart: COSMOS_DB_VIEW_CART_CONTAINER_NAME: 'biz-events-view-cart' COSMOS_QUERY_METRICS: 'false' ORACLE_PM_DB_USER: 'AGID_USER' - ORACLE_SCHEMA: 'AGIDA' + ORACLE_SCHEMA: 'AGID_USER' OTEL_SERVICE_NAME: 'pagopabizpmingestion' OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=uat" OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317" From 08a8d346d3034729cc155a9ab743f1f63e456bbf Mon Sep 17 00:00:00 2001 From: Jacopo Carlini Date: Fri, 13 Sep 2024 12:24:25 +0200 Subject: [PATCH 13/14] swagger fixed --- openapi/openapi.json | 244 +++++++++--------- pom.xml | 6 + .../bizpmingestion/config/OpenApiConfig.java | 135 ++++++++++ .../controller/IPMExtractionController.java | 2 +- src/test/resources/application.properties | 4 + 5 files changed, 271 insertions(+), 120 deletions(-) create mode 100644 src/main/java/it/gov/pagopa/bizpmingestion/config/OpenApiConfig.java diff --git a/openapi/openapi.json b/openapi/openapi.json index 8ffb897..02ad521 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,164 +1,170 @@ { - "openapi": "3.0.1", - "info": { - "title": "OpenAPI definition", - "version": "1.0.2-4-fix-deploy" + "openapi" : "3.0.1", + "info" : { + "title" : "bizpmingestion", + "description" : "Microservice for retrieving payment receipts from the PM.", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "1.0.2-4-fix-deploy" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" + "servers" : [ { + "url" : "http://localhost:8080" + }, { + "url" : "https://{host}{basePath}", + "variables" : { + "host" : { + "default" : "api.dev.platform.pagopa.it", + "enum" : [ "api.dev.platform.pagopa.it", "api.uat.platform.pagopa.it", "api.platform.pagopa.it" ] + }, + "basePath" : { + "default" : "/pm-ingestion/v1", + "enum" : [ "/pm-ingestion/v1" ] + } } - ], - "paths": { - "/extraction/data": { - "post": { - "tags": [ - "PM extraction data REST APIs" - ], - "summary": "Request for data extraction from the PM.", - "operationId": "pmDataExtraction", - "parameters": [ - { - "name": "pmExtractionType", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CARD", - "BPAY", - "PAYPAL" - ] - } + } ], + "paths" : { + "/extraction/data" : { + "post" : { + "tags" : [ "PM extraction data REST APIs" ], + "summary" : "Request for data extraction from the PM.", + "operationId" : "pmDataExtraction", + "parameters" : [ { + "name" : "pmExtractionType", + "in" : "query", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "CARD", "BPAY", "PAYPAL" ] } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DataExtractionOptionsModel" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DataExtractionOptionsModel" } } }, - "required": true + "required" : true }, - "responses": { - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "responses" : { + "409" : { + "description" : "Conflict.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "422": { - "description": "Unprocessable entity.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "422" : { + "description" : "Unprocessable entity.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Malformed request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Wrong or missing function key." - }, - "200": { - "description": "Request paid." - }, - "500": { - "description": "Service unavailable.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "500" : { + "description" : "Service unavailable.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "409": { - "description": "Conflict.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "Request paid." + }, + "400" : { + "description" : "Malformed request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } - } - }, - "security": [ - { - "ApiKey": [] }, - { - "Authorization": [] + "401" : { + "description" : "Wrong or missing function key." } - ] + }, + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "DataExtractionOptionsModel": { - "type": "object", - "properties": { - "taxCodes": { - "type": "array", - "items": { - "type": "string" + "components" : { + "schemas" : { + "DataExtractionOptionsModel" : { + "type" : "object", + "properties" : { + "taxCodes" : { + "type" : "array", + "items" : { + "type" : "string" } }, - "creationDateFrom": { - "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", - "type": "string", - "description": "if provided use the format yyyy-MM-dd", - "format": "date" + "creationDateFrom" : { + "pattern" : "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", + "type" : "string", + "description" : "if provided use the format yyyy-MM-dd", + "format" : "date" }, - "creationDateTo": { - "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", - "type": "string", - "description": "if provided use the format yyyy-MM-dd", - "format": "date" + "creationDateTo" : { + "pattern" : "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", + "type" : "string", + "description" : "if provided use the format yyyy-MM-dd", + "format" : "date" } } }, - "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" + "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 + "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" + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" } } } + }, + "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 0e88910..b01d87e 100644 --- a/pom.xml +++ b/pom.xml @@ -105,6 +105,12 @@ ${springdoc-openapi-ui-version} + + org.springdoc + springdoc-openapi-ui + 1.7.0 + + org.modelmapper diff --git a/src/main/java/it/gov/pagopa/bizpmingestion/config/OpenApiConfig.java b/src/main/java/it/gov/pagopa/bizpmingestion/config/OpenApiConfig.java new file mode 100644 index 0000000..ca59186 --- /dev/null +++ b/src/main/java/it/gov/pagopa/bizpmingestion/config/OpenApiConfig.java @@ -0,0 +1,135 @@ +package it.gov.pagopa.bizpmingestion.config; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Paths; +import io.swagger.v3.oas.models.headers.Header; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.responses.ApiResponses; +import io.swagger.v3.oas.models.security.SecurityScheme; +import io.swagger.v3.oas.models.servers.Server; +import io.swagger.v3.oas.models.servers.ServerVariable; +import io.swagger.v3.oas.models.servers.ServerVariables; +import org.springdoc.core.customizers.OpenApiCustomiser; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.*; + +import static it.gov.pagopa.bizpmingestion.util.Constants.HEADER_REQUEST_ID; + + +@Configuration +public class OpenApiConfig { + + @Bean + OpenAPI customOpenAPI( + @Value("${info.application.artifactId}") String appName, + @Value("${info.application.description}") String appDescription, + @Value("${info.application.version}") String appVersion) { + return new OpenAPI() + .servers(List.of(new Server().url("http://localhost:8080"), + new Server().url("https://{host}{basePath}") + .variables(new ServerVariables() + .addServerVariable("host", + new ServerVariable()._enum(List.of("api.dev.platform.pagopa.it","api.uat.platform.pagopa.it","api.platform.pagopa.it")) + ._default("api.dev.platform.pagopa.it")) + .addServerVariable("basePath", new ServerVariable()._enum(List.of("/pm-ingestion/v1")) + ._default("/pm-ingestion/v1")) + ))) + .components( + new Components() + .addSecuritySchemes( + "ApiKey", + new SecurityScheme() + .type(SecurityScheme.Type.APIKEY) + .description("The API key to access this function app.") + .name("Ocp-Apim-Subscription-Key") + .in(SecurityScheme.In.HEADER))) + .info( + new Info() + .title(appName) + .version(appVersion) + .description(appDescription) + .termsOfService("https://www.pagopa.gov.it/")); + } + + @Bean + public OpenApiCustomiser sortOperationsAlphabetically() { + return openApi -> { + Paths paths = + openApi.getPaths().entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect( + Paths::new, + (map, item) -> map.addPathItem(item.getKey(), item.getValue()), + Paths::putAll); + + paths.forEach( + (key, value) -> + value + .readOperations() + .forEach( + operation -> { + var responses = + operation.getResponses().entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect( + ApiResponses::new, + (map, item) -> + map.addApiResponse(item.getKey(), item.getValue()), + ApiResponses::putAll); + operation.setResponses(responses); + })); + openApi.setPaths(paths); + }; + } + + @Bean + public OpenApiCustomiser addCommonHeaders() { + return openApi -> + openApi + .getPaths() + .forEach( + (key, value) -> { + + // add Request-ID as request header + var header = + Optional.ofNullable(value.getParameters()) + .orElse(Collections.emptyList()) + .parallelStream() + .filter(Objects::nonNull) + .anyMatch(elem -> HEADER_REQUEST_ID.equals(elem.getName())); + if (!header) { + value.addParametersItem( + new Parameter() + .in("header") + .name(HEADER_REQUEST_ID) + .schema(new StringSchema()) + .description( + "This header identifies the call, if not passed it is" + + " self-generated. This ID is returned in the response.")); + } + + // add Request-ID as response header + value + .readOperations() + .forEach( + operation -> + operation + .getResponses() + .values() + .forEach( + response -> + response.addHeaderObject( + HEADER_REQUEST_ID, + new Header() + .schema(new StringSchema()) + .description( + "This header identifies the call")))); + }); + } +} diff --git a/src/main/java/it/gov/pagopa/bizpmingestion/controller/IPMExtractionController.java b/src/main/java/it/gov/pagopa/bizpmingestion/controller/IPMExtractionController.java index 313e88b..0050189 100644 --- a/src/main/java/it/gov/pagopa/bizpmingestion/controller/IPMExtractionController.java +++ b/src/main/java/it/gov/pagopa/bizpmingestion/controller/IPMExtractionController.java @@ -24,7 +24,7 @@ @Validated public interface IPMExtractionController { - @Operation(summary = "Request for data extraction from the PM.", security = {@SecurityRequirement(name = "ApiKey"), @SecurityRequirement(name = "Authorization")}, operationId = "pmDataExtraction") + @Operation(summary = "Request for data extraction from the PM.", security = {@SecurityRequirement(name = "ApiKey"), @SecurityRequirement(name = "ApiKey")}, operationId = "pmDataExtraction") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Request paid."), @ApiResponse(responseCode = "400", description = "Malformed request.", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = ProblemJson.class))), diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index e2a2ff5..7df0f82 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -1,3 +1,7 @@ +info.application.artifactId=@project.artifactId@ +info.application.name=@project.name@ +info.application.version=@project.version@ +info.application.description=@project.description@ info.properties.environment=test # OracleDB Database settings spring.datasource.url=url From dea29c0a00def0729cc17577606c0f30fb660fdb Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Fri, 13 Sep 2024 10:25:40 +0000 Subject: [PATCH 14/14] Bump to version 1.0.2-5-fix-deploy [skip ci] --- helm/Chart.yaml | 4 +- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- openapi/openapi.json | 259 +++++++++++++++++++++++------------------- pom.xml | 2 +- 6 files changed, 145 insertions(+), 126 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index ffb0e89..dd2efbb 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-afm-calculator description: Microservice that handles calculation for pagoPA Advanced Fees Management type: application -version: 0.18.0 -appVersion: 1.0.2-4-fix-deploy +version: 0.19.0 +appVersion: 1.0.2-5-fix-deploy dependencies: - name: microservice-chart version: 5.9.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 9e8e2aa..2cfb72e 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-4-fix-deploy" + tag: "1.0.2-5-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 6fcb869..3baff1c 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-4-fix-deploy" + tag: "1.0.2-5-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 1a9499b..0af9558 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "pagopa-biz-pm-ingestion" image: repository: ghcr.io/pagopa/pagopa-biz-pm-ingestion - tag: "1.0.2-4-fix-deploy" + tag: "1.0.2-5-fix-deploy" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.json b/openapi/openapi.json index 02ad521..f674f97 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,170 +1,189 @@ { - "openapi" : "3.0.1", - "info" : { - "title" : "bizpmingestion", - "description" : "Microservice for retrieving payment receipts from the PM.", - "termsOfService" : "https://www.pagopa.gov.it/", - "version" : "1.0.2-4-fix-deploy" + "openapi": "3.0.1", + "info": { + "title": "bizpmingestion", + "description": "Microservice for retrieving payment receipts from the PM.", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "1.0.2-5-fix-deploy" }, - "servers" : [ { - "url" : "http://localhost:8080" - }, { - "url" : "https://{host}{basePath}", - "variables" : { - "host" : { - "default" : "api.dev.platform.pagopa.it", - "enum" : [ "api.dev.platform.pagopa.it", "api.uat.platform.pagopa.it", "api.platform.pagopa.it" ] - }, - "basePath" : { - "default" : "/pm-ingestion/v1", - "enum" : [ "/pm-ingestion/v1" ] + "servers": [ + { + "url": "http://localhost:8080" + }, + { + "url": "https://{host}{basePath}", + "variables": { + "host": { + "default": "api.dev.platform.pagopa.it", + "enum": [ + "api.dev.platform.pagopa.it", + "api.uat.platform.pagopa.it", + "api.platform.pagopa.it" + ] + }, + "basePath": { + "default": "/pm-ingestion/v1", + "enum": [ + "/pm-ingestion/v1" + ] + } } } - } ], - "paths" : { - "/extraction/data" : { - "post" : { - "tags" : [ "PM extraction data REST APIs" ], - "summary" : "Request for data extraction from the PM.", - "operationId" : "pmDataExtraction", - "parameters" : [ { - "name" : "pmExtractionType", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "CARD", "BPAY", "PAYPAL" ] + ], + "paths": { + "/extraction/data": { + "post": { + "tags": [ + "PM extraction data REST APIs" + ], + "summary": "Request for data extraction from the PM.", + "operationId": "pmDataExtraction", + "parameters": [ + { + "name": "pmExtractionType", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CARD", + "BPAY", + "PAYPAL" + ] + } } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataExtractionOptionsModel" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataExtractionOptionsModel" } } }, - "required" : true + "required": true }, - "responses" : { - "409" : { - "description" : "Conflict.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "responses": { + "409": { + "description": "Conflict.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "422" : { - "description" : "Unprocessable entity.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "422": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "404": { + "description": "Not found.", + "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" : "Request paid." + "200": { + "description": "Request paid." }, - "400" : { - "description" : "Malformed request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProblemJson" + "400": { + "description": "Malformed request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" } } } }, - "401" : { - "description" : "Wrong or missing function key." + "401": { + "description": "Wrong or missing function key." } }, - "security" : [ { - "ApiKey" : [ ] - } ] + "security": [ + { + "ApiKey": [] + } + ] } } }, - "components" : { - "schemas" : { - "DataExtractionOptionsModel" : { - "type" : "object", - "properties" : { - "taxCodes" : { - "type" : "array", - "items" : { - "type" : "string" + "components": { + "schemas": { + "DataExtractionOptionsModel": { + "type": "object", + "properties": { + "taxCodes": { + "type": "array", + "items": { + "type": "string" } }, - "creationDateFrom" : { - "pattern" : "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", - "type" : "string", - "description" : "if provided use the format yyyy-MM-dd", - "format" : "date" + "creationDateFrom": { + "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", + "type": "string", + "description": "if provided use the format yyyy-MM-dd", + "format": "date" }, - "creationDateTo" : { - "pattern" : "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", - "type" : "string", - "description" : "if provided use the format yyyy-MM-dd", - "format" : "date" + "creationDateTo": { + "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\n", + "type": "string", + "description": "if provided use the format yyyy-MM-dd", + "format": "date" } } }, - "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" + "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 + "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" + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" } } } }, - "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 b01d87e..6fe5820 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa bizpmingestion - 1.0.2-4-fix-deploy + 1.0.2-5-fix-deploy Biz PM Ingestion Microservice for retrieving payment receipts from the PM.