-
Notifications
You must be signed in to change notification settings - Fork 6
Description
While implementing the ProvideChargingInformationRequest according to VDV 463, we identified an ambiguity regarding required numeric (number) and date-time fields defined in the JSON Schema.
According to JSON Schema rules, fields listed as required must be present in the payload and must contain a value conforming to their declared type.
For fields with type: "number", this means that a valid numeric value must be provided, unless the schema explicitly allows null. For fields with type: "date-time" similar.
The VDV 463 specification and the corresponding JSON Schemas do not clearly state how implementations should handle situations in which a required numeric value is temporarily not available (e.g. due to missing measurement data e.g. for ChargingPower ) or date-time values could not be calculated by the system.
The following fields are defined as required:
ChargingInformation:
- ElectricData->ChargingPower
- ChargingPredictionDataFinalSoc->predictedFinalSoc
- ChargingPredictionDataFinalSoc->predictedTime
- ChargingPredictionDataMinSoc->predictedFinalSoc
- ChargingPredictionDataMinSoc->predictedTime
- ChargingPredictionDataDepartureTime->predictedDepartureTimeSoc
- ChargingPredictionDataDepartureTime->predictedTime
ChargingRequest:
- ChargingRequestData->minTargetSoc
- ChargingRequestData->maxTargetSoc
We should discuss how we like to handle this, IMHO we have the following choices:
- Define the field as nullable "type": ["number","null"],
- Change the field to optional.