Fixed OCPP Update Firmware
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
}
}
},
- "/api/chargingstations/general/firmware": {
- "put": {
+ "/api/chargingstations/firmware/update": {
+ "post": {
"security": [
{
"bearerAuth": []
"application/json": {
"schema": {
"type": "object",
- "required": [
- "id",
- "location",
- "retrieveDate"
- ],
"properties": {
"chargeBoxID": {
- "type": "string"
+ "type": "string",
+ "example": ""
},
+ "args": {
+ "type": "object",
+ "properties": {
"location": {
- "type": "string"
+ "type": "string",
+ "example": ""
},
"retries": {
- "type": "number"
+ "type": "integer",
+ "minimum": 1,
+ "example": 1
},
"retrieveDate": {
"type": "string",
"format": "date-time"
},
"retryInterval": {
- "type": "number"
+ "type": "integer",
+ "minimum": 1,
+ "example": 5
+ }
}
}
+ },
+ "required": [
+ "location",
+ "retrieveDate"
+ ]
}
}
}

MODIFY
src/server/rest/v1/router/api/ChargingStationRouter.ts
src/server/rest/v1/router/api/ChargingStationRouter.ts
@@ -32,7 +32,7 @@ export default class ChargingStationRouter {
this.buildRouteChargingStationRemoteStop();
this.buildRouteChargingStationUnlockConnector();
this.buildRouteChargingStationGenerateQRCode();
- this.buildRouteChargingStationCompositeSchedule();
+ this.buildRouteChargingStationGetCompositeSchedule();
this.buildRouteChargingStationGetDiagnostics();
this.buildRouteChargingStationUpdateFirmware();
this.buildRouteChargingStationDownloadQRCode();
@@ -100,8 +100,8 @@ export default class ChargingStationRouter {
});
}
- protected buildRouteChargingStationCompositeSchedule(): void {
- this.router.post(`/${ServerRoute.REST_CHARGING_STATIONS_COMPOSITE_SCHEDULE}`, async (req: Request, res: Response, next: NextFunction) => {
+ protected buildRouteChargingStationGetCompositeSchedule(): void {
+ this.router.post(`/${ServerRoute.REST_CHARGING_STATIONS_GET_COMPOSITE_SCHEDULE}`, async (req: Request, res: Response, next: NextFunction) => {
await RouterUtils.handleServerAction(ChargingStationService.handleAction.bind(this), ServerAction.CHARGING_STATION_GET_COMPOSITE_SCHEDULE, req, res, next);
});
}
@@ -113,7 +113,7 @@ export default class ChargingStationRouter {
}
protected buildRouteChargingStationUpdateFirmware(): void {
- this.router.post(`/${ServerRoute.REST_CHARGING_STATIONS_FIRMWARE}`, async (req: Request, res: Response, next: NextFunction) => {
+ this.router.post(`/${ServerRoute.REST_CHARGING_STATIONS_FIRMWARE_UPDATE}`, async (req: Request, res: Response, next: NextFunction) => {
await RouterUtils.handleServerAction(ChargingStationService.handleAction.bind(this), ServerAction.CHARGING_STATION_UPDATE_FIRMWARE, req, res, next);
});
}

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -407,9 +407,9 @@ export enum ServerRoute {
REST_CHARGING_STATIONS_REMOTE_START = 'chargingstations/remote/start',
REST_CHARGING_STATIONS_REMOTE_STOP = 'chargingstations/remote/stop',
REST_CHARGING_STATIONS_UNLOCK_CONNECTOR = 'chargingstations/connectors/unlock',
- REST_CHARGING_STATIONS_COMPOSITE_SCHEDULE = 'chargingstations/compositeschedule',
+ REST_CHARGING_STATIONS_GET_COMPOSITE_SCHEDULE = 'chargingstations/compositeschedule',
REST_CHARGING_STATIONS_GET_DIAGNOSTICS = 'chargingstations/diagnostics',
- REST_CHARGING_STATIONS_FIRMWARE = 'chargingstations/general/firmware',
+ REST_CHARGING_STATIONS_FIRMWARE_UPDATE = 'chargingstations/firmware/update',
REST_CHARGING_STATIONS_AVAILABILITY = 'chargingstations/general/availability',
REST_CHARGING_STATIONS_DOWNLOAD_FIRMWARE = 'chargingstations/firmware/:id',

Fixed OCPP Update Firmware