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

[PPANTT-142] feat: New API getAllStationsMaintenances #33

Merged
merged 10 commits into from
Oct 17, 2024
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pagopa-afm-calculator
description: Microservice that handles calculation for pagoPA Advanced Fees Management
type: application
version: 0.43.0
appVersion: 1.6.0
version: 0.45.0
appVersion: 1.6.0-2-PPANTT-142-get-all-maintenances
dependencies:
- name: microservice-chart
version: 2.8.0
Expand Down
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: "backoffice-external"
image:
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "1.6.0"
tag: "1.6.0-2-PPANTT-142-get-all-maintenances"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: "backoffice-external"
image:
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "1.6.0"
tag: "1.6.0-2-PPANTT-142-get-all-maintenances"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: "backoffice-external"
image:
repository: ghcr.io/pagopa/pagopa-backoffice-external
tag: "1.6.0"
tag: "1.6.0-2-PPANTT-142-get-all-maintenances"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
139 changes: 138 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Microservice to expose REST API to contact PagoPA Backoffice",
"termsOfService": "https://www.pagopa.gov.it/",
"title": "Backoffice External",
"version": "1.6.0"
"version": "1.6.0-2-PPANTT-142-get-all-maintenances"
},
"servers": [
{
Expand Down Expand Up @@ -666,6 +666,143 @@
}
]
},
"/station-maintenances": {
"get": {
"description": "Internal | External | Synchronous | Authorization | Authentication | TPS | Idempotency | Stateless | Read/Write Intense | Cacheable\n-|-|-|-|-|-|-|-|-|-\nN | Y | Y | ApiKey | ApiKey | 1.0/sec | Y | Y | Read | N\n",
"operationId": "getAllStationsMaintenances",
"parameters": [
{
"description": "Maintenances' state",
"in": "query",
"name": "state",
"required": false,
"schema": {
"type": "string",
"default": "SCHEDULED_AND_IN_PROGRESS",
"enum": [
"SCHEDULED_AND_IN_PROGRESS",
"SCHEDULED",
"IN_PROGRESS",
"FINISHED"
]
}
},
{
"description": "Maintenance's starting year",
"in": "query",
"name": "year",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StationMaintenanceListResource"
}
}
},
"description": "Ok",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
},
"description": "Bad Request",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
},
"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": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
},
"description": "Service unavailable",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
}
},
"summary": "Get list of all stations' maintenance filtered by state",
"tags": [
"Station Maintenance"
]
},
"parameters": [
{
"description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
"in": "header",
"name": "X-Request-Id",
"schema": {
"type": "string"
}
}
]
},
"/station-maintenances/{broker-tax-code}": {
"get": {
"description": "Internal | External | Synchronous | Authorization | Authentication | TPS | Idempotency | Stateless | Read/Write Intense | Cacheable\n-|-|-|-|-|-|-|-|-|-\nN | Y | Y | ApiKey | ApiKey | 1.0/sec | Y | Y | Read | N\n",
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_backoffice_external_ec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Microservice to expose REST API to contact PagoPA Backoffice",
"termsOfService": "https://www.pagopa.gov.it/",
"title": "Backoffice External - Backoffice External EC",
"version": "1.6.0"
"version": "1.6.0-2-PPANTT-142-get-all-maintenances"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_backoffice_external_psp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Microservice to expose REST API to contact PagoPA Backoffice",
"termsOfService": "https://www.pagopa.gov.it/",
"title": "Backoffice External - Backoffice External PSP",
"version": "1.6.0"
"version": "1.6.0-2-PPANTT-142-get-all-maintenances"
},
"servers": [
{
Expand Down
138 changes: 137 additions & 1 deletion openapi/openapi_backoffice_helpdesk.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Microservice to expose REST API to contact PagoPA Backoffice",
"termsOfService": "https://www.pagopa.gov.it/",
"title": "Backoffice External - Backoffice Helpdesk",
"version": "1.6.0"
"version": "1.6.0-2-PPANTT-142-get-all-maintenances"
},
"servers": [
{
Expand Down Expand Up @@ -185,6 +185,142 @@
}
]
},
"/station-maintenances": {
"get": {
"operationId": "getAllStationsMaintenances",
"parameters": [
{
"description": "Maintenances' state",
"in": "query",
"name": "state",
"required": false,
"schema": {
"type": "string",
"default": "SCHEDULED_AND_IN_PROGRESS",
"enum": [
"SCHEDULED_AND_IN_PROGRESS",
"SCHEDULED",
"IN_PROGRESS",
"FINISHED"
]
}
},
{
"description": "Maintenance's starting year",
"in": "query",
"name": "year",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StationMaintenanceListResource"
}
}
},
"description": "Ok",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
},
"description": "Bad Request",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
},
"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": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
},
"description": "Service unavailable",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
}
},
"summary": "Get list of all stations' maintenance filtered by state",
"tags": [
"Station Maintenance"
]
},
"parameters": [
{
"description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
"in": "header",
"name": "X-Request-Id",
"schema": {
"type": "string"
}
}
]
},
"/station-maintenances/{broker-tax-code}": {
"get": {
"operationId": "getStationMaintenances",
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>it.pagopa.selfcare.pagopa</groupId>
<artifactId>pagopa-backoffice-external</artifactId>
<version>1.6.0</version>
<version>1.6.0-2-PPANTT-142-get-all-maintenances</version>
<name>Backoffice External</name>
<description>Microservice to expose REST API to contact PagoPA Backoffice</description>

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
@FeignClient(name = "api-config", url = "${rest-client.api-config.base-url}", configuration = ApiConfigFeignConfig.class)
public interface ApiConfigClient {

@GetMapping(value = "brokers/station-maintenances", produces = {MediaType.APPLICATION_JSON_VALUE})
StationMaintenanceListResource getAllStationsMaintenances(
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime startDateTimeBefore,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime startDateTimeAfter,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime endDateTimeBefore,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime endDateTimeAfter
);

@GetMapping(value = "brokers/{broker-code}/station-maintenances", produces = {MediaType.APPLICATION_JSON_VALUE})
StationMaintenanceListResource getStationMaintenances(
@PathVariable("broker-code") String brokerCode,
Expand Down
Loading
Loading