Skip to content

Commit

Permalink
fix field certificateType data type and register certificateUse16 val…
Browse files Browse the repository at this point in the history
…idation
  • Loading branch information
dwibudut committed Sep 18, 2024
1 parent 793a714 commit c772fa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ocpp1.6/certificates/get_installed_certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func isValidGetInstalledCertificateStatus(fl validator.FieldLevel) bool {

// The field definition of the GetInstalledCertificateIdsRequest PDU sent by the CSMS to the Charging Station.
type GetInstalledCertificateIdsRequest struct {
CertificateTypes []types.CertificateUse `json:"certificateType" validate:"omitempty,dive,certificateUse16"`
CertificateType types.CertificateUse `json:"certificateType" validate:"required,certificateUse16"`
}

// The field definition of the GetInstalledCertificateIds response payload sent by the Charging Station to the CSMS in response to a GetInstalledCertificateIdsRequest.
Expand Down
2 changes: 1 addition & 1 deletion ocpp1.6/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,6 @@ func init() {
_ = Validate.RegisterValidation("location16", isValidLocation)
_ = Validate.RegisterValidation("unitOfMeasure", isValidUnitOfMeasure)
_ = Validate.RegisterValidation("certificateSigningUse16", isValidCertificateSigningUse)
_ = Validate.RegisterValidation("isValidCertificateUse", isValidCertificateUse)
_ = Validate.RegisterValidation("certificateUse16", isValidCertificateUse)
_ = Validate.RegisterValidation("genericStatus16", isValidGenericStatus)
}

0 comments on commit c772fa8

Please sign in to comment.