Skip to content

Clarification needed: Handling of required numeric (float) and date-time fields when values are not available  #64

@martinfrenzel

Description

@martinfrenzel

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:

  1. ElectricData->ChargingPower
  2. ChargingPredictionDataFinalSoc->predictedFinalSoc
  3. ChargingPredictionDataFinalSoc->predictedTime
  4. ChargingPredictionDataMinSoc->predictedFinalSoc
  5. ChargingPredictionDataMinSoc->predictedTime
  6. ChargingPredictionDataDepartureTime->predictedDepartureTimeSoc
  7. ChargingPredictionDataDepartureTime->predictedTime

ChargingRequest:

  1. ChargingRequestData->minTargetSoc
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions