Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VAS-828] feat: add generate massive #3

Merged
merged 17 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0721fc1
[VAS-828] feat: introducing massive generation API
alessio-cialini Apr 18, 2024
fd9baa4
[VAS-828] feat: introducing massive generation API
alessio-cialini Apr 18, 2024
32e5b43
Merge remote-tracking branch 'origin/VAS-828-feat-add-generate-massiv…
alessio-cialini Apr 18, 2024
54911e6
[VAS-828] feat: Introducing massive generation logic and unit testing
alessio-cialini Apr 19, 2024
3aa98e1
[VAS-828] feat: Updated notice generation massive request and tests
alessio-cialini Apr 22, 2024
58695be
[VAS-828] feat: introducing massive generation API
alessio-cialini Apr 18, 2024
466a82e
[VAS-828] feat: Introducing massive generation logic and unit testing
alessio-cialini Apr 19, 2024
0d38f31
[VAS-828] feat: Updated notice generation massive request and tests
alessio-cialini Apr 22, 2024
8dd1b32
[VAS-828] feat: Updated openapi and helm charts
alessio-cialini Apr 22, 2024
eb3295f
Merge remote-tracking branch 'origin/VAS-828-feat-add-generate-massiv…
alessio-cialini Apr 22, 2024
742b8f0
Merge branch 'VAS-826-feat-add-get-template-api' into VAS-828-feat-ad…
alessio-cialini Apr 23, 2024
7dd6a99
Merge branch 'main' into VAS-828-feat-add-generate-massive
jacopocarlini Apr 23, 2024
878b58e
[VAS-828] feat: fixed errors
alessio-cialini Apr 23, 2024
d5c7970
Merge remote-tracking branch 'origin/VAS-828-feat-add-generate-massiv…
alessio-cialini Apr 23, 2024
737332b
[VAS-828] feat: Updated code_review, removed unused method
alessio-cialini Apr 23, 2024
4fb1c6c
[VAS-828] feat: Updated Aes256Exception, CreditorInstitution
alessio-cialini Apr 23, 2024
04d570f
[VAS-828] feat: Updated Debtor to exclude pii
alessio-cialini Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
project_key: ${{env.PROJECT_KEY}}
coverage_exclusions: "**/config/*,**/*Mock*,**/model/**,**/entity/*"
coverage_exclusions: "**/config/*,**/*Mock*,**/model/**,**/entity/*,**/exception/*"
cpd_exclusions: "**/model/**,**/entity/*"
java_version: 17

Expand Down
2 changes: 2 additions & 0 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ microservice-chart:
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
KAFKA_BROKER: "pagopa-d-printit-evh-ns01.servicebus.windows.net:9092"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
MONGODB_CONNECTION_URI: 'notices_mongo_connection_string'
TEMPLATE_STORAGE_CONN_STRING: 'templates_storage_account_connection_string'
KAFKA_SASL_JAAS_CONFIG: 'ehub_notice_connection_string'
keyvault:
name: "pagopa-d-itn-printit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down
2 changes: 2 additions & 0 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ microservice-chart:
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
KAFKA_BROKER: "pagopa-p-printit-evh-ns01.servicebus.windows.net:9092"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-p-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
MONGODB_CONNECTION_URI: 'notices_mongo_connection_string'
TEMPLATE_STORAGE_CONN_STRING: 'templates_storage_account_connection_string'
KAFKA_SASL_JAAS_CONFIG: 'ehub_notice_connection_string'
keyvault:
name: "pagopa-p-itn-printit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down
2 changes: 2 additions & 0 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ microservice-chart:
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
KAFKA_BROKER: "pagopa-u-printit-evh-ns01.servicebus.windows.net:9092"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-u-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
MONGODB_CONNECTION_URI: 'notices_mongo_connection_string'
TEMPLATE_STORAGE_CONN_STRING: 'templates_storage_account_connection_string'
KAFKA_SASL_JAAS_CONFIG: 'ehub_notice_connection_string'
keyvault:
name: "pagopa-u-itn-printit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down
241 changes: 241 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,133 @@
}
} ]
},
"/notices/generate-massive" : {
"post" : {
"tags" : [ "Notice Generation Request APIs" ],
"summary" : "generateNoticeMassiveRequest",
"description" : "Insert massive notice generation request and returns folderId for reference an future recovery",
"operationId" : "generateNoticeMassiveRequest",
"parameters" : [ {
"name" : "X-User-Id",
"in" : "header",
"description" : "userId to use for request status retrieval",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NoticeGenerationMassiveRequest"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "OK",
"headers" : {
"X-Request-Id" : {
"description" : "This header identifies the call",
"schema" : {
"type" : "string"
}
}
},
"content" : {
"application/json" : {
"schema" : {
"type" : "string"
}
}
}
},
"400" : {
"description" : "Bad Request",
"headers" : {
"X-Request-Id" : {
"description" : "This header identifies the call",
"schema" : {
"type" : "string"
}
}
},
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemJson"
}
}
}
},
"401" : {
"description" : "Unauthorized",
"headers" : {
"X-Request-Id" : {
"description" : "This header identifies the call",
"schema" : {
"type" : "string"
}
}
}
},
"403" : {
"description" : "Forbidden",
"headers" : {
"X-Request-Id" : {
"description" : "This header identifies the call",
"schema" : {
"type" : "string"
}
}
}
},
"429" : {
"description" : "Too many requests",
"headers" : {
"X-Request-Id" : {
"description" : "This header identifies the call",
"schema" : {
"type" : "string"
}
}
}
},
"500" : {
"description" : "Service unavailable",
"headers" : {
"X-Request-Id" : {
"description" : "This header identifies the call",
"schema" : {
"type" : "string"
}
}
},
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProblemJson"
}
}
}
}
},
"security" : [ {
"ApiKey" : [ ]
} ]
},
"parameters" : [ {
"name" : "X-Request-Id",
"in" : "header",
"description" : "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
"schema" : {
"type" : "string"
}
} ]
},
"/notices/templates/{template_id}" : {
"get" : {
"tags" : [ "Notice Templates APIs" ],
Expand Down Expand Up @@ -306,6 +433,120 @@
},
"components" : {
"schemas" : {
"CreditorInstitution" : {
"type" : "object",
"description" : "Creditor Institution data"
},
"Debtor" : {
"type" : "object",
"description" : "Debtor data"
},
"InstallmentData" : {
"required" : [ "amount", "dueDate" ],
"type" : "object",
"properties" : {
"amount" : {
"type" : "integer",
"description" : "Installment amount",
"format" : "int32"
},
"dueDate" : {
"type" : "string",
"description" : "Installment dueDate"
}
},
"description" : "Installments of the notice"
},
"Installments" : {
"type" : "object",
"properties" : {
"number" : {
"type" : "integer",
"description" : "Number of installments",
"format" : "int32"
},
"data" : {
"type" : "array",
"description" : "Installments of the notice",
"items" : {
"$ref" : "#/components/schemas/InstallmentData"
}
}
},
"description" : "Notice installments (if present)"
},
"Notice" : {
"required" : [ "code", "dueDate", "paymentAmount", "subject" ],
"type" : "object",
"properties" : {
"subject" : {
"type" : "string",
"description" : "Notice subject"
},
"paymentAmount" : {
"type" : "integer",
"description" : "Notice total amount to pay",
"format" : "int64"
},
"dueDate" : {
"type" : "string",
"description" : "Notice due date"
},
"code" : {
"type" : "string",
"description" : "Notice code"
},
"installments" : {
"type" : "array",
"description" : "Notice installments (if present)",
"items" : {
"$ref" : "#/components/schemas/Installments"
}
}
},
"description" : "Notice data"
},
"NoticeGenerationMassiveRequest" : {
"required" : [ "notices" ],
"type" : "object",
"properties" : {
"notices" : {
"maxItems" : 2147483647,
"minItems" : 1,
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/NoticeGenerationRequestItem"
}
}
},
"description" : "massive notice generation request data"
},
"NoticeGenerationRequestItem" : {
"type" : "object",
"properties" : {
"templateId" : {
"type" : "string"
},
"data" : {
"$ref" : "#/components/schemas/NoticeRequestData"
}
}
},
"NoticeRequestData" : {
"required" : [ "creditorInstitution", "debtor", "notice" ],
"type" : "object",
"properties" : {
"notice" : {
"$ref" : "#/components/schemas/Notice"
},
"creditorInstitution" : {
"$ref" : "#/components/schemas/CreditorInstitution"
},
"debtor" : {
"$ref" : "#/components/schemas/Debtor"
}
}
},
"ProblemJson" : {
"type" : "object",
"properties" : {
Expand Down
Loading
Loading