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

Add Validations to JSON Schema Properties #36

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

Basler182
Copy link
Contributor

The current JSON schemas lack validations for numerical properties. These validations ensure that the data conforms to expected value ranges. This aims to enhance the robustness and accuracy of the schema definitions.

@maikwoehl-psi maikwoehl-psi added wait-for-approval Waiting for official approval by VDV proposed A proposal to interface change discussion required to be discussed in VDV463 WG labels Jul 9, 2024
@maikwoehl-psi maikwoehl-psi self-assigned this Jul 9, 2024
@maikwoehl-psi
Copy link
Collaborator

Hallo @DohmenClaus,

wie lautet hierzu die Abstimmung?

Angesichts der letzten Diskussionen bin ich mir nicht sicher, ob die Einführung einer Restriktion einen "Breaking Change" darstellt. Ich bin gewillt zu sagen, dass dadurch zwar die Implementierung ggbf. angepasst werden muss, diese dafür dann aber stabiler ist. Für den Fall, dass irgendjemand Gleitkommazahlen statt Ganzzahlen von 0 bis 100 verwendet hat, ist das bestimmt eine sinnvolle Verbesserung.

Viele Grüße

Maik Wöhl

@Basler182
Copy link
Contributor Author

Basler182 commented Jul 10, 2024

Vielen Dank für deinen Kommentar und die Anmerkungen, @maikwoehl-psi. Die Festlegung eines Wertebereichs durch Minimum und Maximum dient lediglich zur Begrenzung der Werte, ändert jedoch nicht den zugrunde liegenden Datentyp. Wenn ich nachfolgendes aber richtig verstehe:

Für den Fall, dass irgendjemand Gleitkommazahlen statt Ganzzahlen verwendet hat, ist das bestimmt eine sinnvolle Verbesserung.

Impliziert deine Nachricht, dass der zugrunde liegende Datentyp selbst von number auf integer geändert werden sollte. Wenn das korrekt ist und der aktuelle Datentyp in der Definition tatsächlich falsch hinterlegt ist, dann kann ich dies im PR zusätzlich korrigieren. Es wäre hilfreich, dies nochmals zu bestätigen, um die Implementierung entsprechend anzupassen und zu optimieren.

@maikwoehl-psi maikwoehl-psi added accepted discussed Topic was discussed in WG and removed wait-for-approval Waiting for official approval by VDV proposed A proposal to interface change discussion required to be discussed in VDV463 WG labels Sep 17, 2024
@maikwoehl-psi maikwoehl-psi self-requested a review September 17, 2024 08:15
@maikwoehl-psi maikwoehl-psi added this to the Version 1.1.0 milestone Sep 17, 2024
@maikwoehl-psi
Copy link
Collaborator

@Basler182 Eine Anpassung des Datentyps sehen wir für die Version 1.1.0 aktuell nicht vor.
Wir werden das Thema der genutzten Datentypen aber grundsätzlich als Diskussionspunkt in die Version 2.0 aufnehmen.

@maikwoehl-psi maikwoehl-psi merged commit 0ac3fdf into VDVde:v1.1-dev Sep 25, 2024
maikwoehl-psi added a commit that referenced this pull request Dec 2, 2024
* Add v1.1 JSON schemas fixing issues #2 and #3

* Fixes #5

* removing "uri" format constraint from all string identifiers

as agreed in the VDV 463 meeting

* removing "uri" format constraint from all string identifiers

* removing "uri" format constraint from all string identifiers

* Remove obsolete whitespace changes

* #20: Allow empty arrays

* #22: Allow empty ChargingPredictionData

* #22: Add structure ChargingPredictionDataDepartureTime to ChargingPredictionData

* #22: Fix descriptions

* Update v1.1/ProvideChargingInformationRequest.json

Co-authored-by: Maik Wöhl <[email protected]>

* Update v1.1/ProvideChargingInformationRequest.json

Co-authored-by: Maik Wöhl <[email protected]>

* Add critical condition for tractionBattery, add hydrogentankinfo (#16)

* Add critical condition for tractionBattery, add hydrogentankinfo

* Move vehicleInfo into it's own list

* Add VehicleId to ChargingPointInfo to reference it

* Switch criticalCondition to integer to reflect SNA values

* Revert "Add VehicleId to ChargingPointInfo to reference it"

This reverts commit d14814e.

Revert "Move vehicleInfo into it's own list"

This reverts commit 0aa89ce.

* Rename criticalCondition to status

* Revert "Add v1.1 JSON schemas fixing issues #2 and #3"

* Add evccId to VehicleInfo structure

Closes #30

* Revert "Add critical condition for tractionBattery, add hydrogentankinfo (#16)"

This reverts commit c82bf61.

* Add Validations to JSON Schema Properties (#36)

* Move changes of v1.1 to v1.0

Signed-off-by: Maik Wöhl <[email protected]>

* Rename v1.0 to schema

Signed-off-by: Maik Wöhl <[email protected]>

---------

Signed-off-by: Maik Wöhl <[email protected]>
Co-authored-by: Kowatsch, Benjamin <[email protected]>
Co-authored-by: Dominique Müller <[email protected]>
Co-authored-by: Benjamin Kowatsch <[email protected]>
Co-authored-by: DohmenClaus <[email protected]>
Co-authored-by: Kilian Schneider <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted discussed Topic was discussed in WG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants