Skip to content

GPD micro-service that provides Bulk APIs for managing payment positions via file upload

Notifications You must be signed in to change notification settings

pagopa/pagopa-gpd-upload

Repository files navigation

GPD Massive Upload µ-service

Quality Gate Status Integration Tests

This microservice has the responsibility of handling the upload of the files holding debt positions. It allows the creditor institutions to:

  • CRUD operations on Debt Positions through zip file Upload
  • Get Debt Positions massive Upload status
  • Get Debt Positions massive Upload report

Api Documentation 📖

See the OpenApi 3 here.


Technology Stack

  • Java 17
  • Micronaut
  • Azure Storage Blob

Start Project Locally 🚀

Prerequisites

  • docker

Run docker container

  1. From ./docker directory
sh ./run_docker.sh local
  1. From root directory
docker build -t <container-name> .
docker run -p 8080:8080 --env-file <docker-env-file> <container-name>

Develop Locally 💻

Prerequisites

  • git
  • maven
  • jdk-17

Run the project

cp .env.sample .env

After setting all required environment variables

set -o allexport                       
source .env     
set +o allexport

Start the micronaut application with this command:

mvn mn:run

Start without hot reload

mn:run -Dmn.watch=false

Rule of thumb

Prevent more than 1 file in with macOS

zip -d filename.zip __MACOSX/\*

zip -d filename.zip \*/.DS_Store

zip file.zip uncompressed

Micronaut Profiles

  • local: to develop locally.
  • default (no profile set): The application gets the properties from the environment (for Azure).

Testing 🧪

Unit testing

To run the Junit tests:

mvn clean verify

Integration testing

From ./integration-test/src

  1. yarn install
  2. yarn test

Performance testing

install k6 and then from ./performance-test/src

  1. k6 run --env VARS=local.environment.json --env TEST_TYPE=./test-types/load.json main_scenario.js

Contributors 👥

Made with ❤️ by PagoPa S.p.A.

Mainteiners

See CODEOWNERS file