networknt/json-schema-validator lädt error messages mit default OS locale
Description of the bug:
Die im Java SDK verwendete json library networknt/json-schema-validator lädt Templates für Fehlermeldungen in der OS spezifischen Locale. Das führt unter anderem dazu, das bspw. Unit-Test auf einem System mit Deutscher Locale fehlschagen, da die Test-Assertions Englisch erwarten:
Current behavior:
Expected: a string containing "$.events.https://schema.fitko.de/fit-connect/events/accept-submission.authenticationTags.data: null found"
but: was "$.events.https://schema.fitko.de/fit-connect/events/accept-submission.authenticationTags.data: null wurde gefunden, aber string erwartet"
Expected behavior:
Die Sprache der Fehlermeldungen ist unabhängig von der System-Locale auf dem das SDk gebaut wird.
Additional Information:
Die Angabe der Locale über ein Config-Objekt der lib kann das Problem beheben.
// fixe Angabe der Locale
final SchemaValidatorsConfig validatorsConfig = new SchemaValidatorsConfig();
validatorsConfig.setLocale(Locale.ENGLISH);
// Erzeugung des Validators mit config
SCHEMA_FACTORY_DRAFT_2007.getSchema(schema, validatorsConfig).validate(inputNode);
Dependency / relationship to other issues:
Responsible person / team:
Contact persons including contact details:
Screenshots / Logs / Requests:
Checklist:
-
Add Severity label -
Add team label -
Related/affected issues/stories/epics linked and explained in the bug issue -
Creation of an automated test -
Bugfix deployed on DEV -
Bugfix tested on DEV -
Bugfix deployed on TEST -
Bugfix tested on TEST (possibly also by the connection project itself) -
Successful fix reported to Team Operations (Teams channel) -
Bugfix deployed on STAGE -
Bugfix tested on STAGE if necessary -
Bugfix deployed on PROD -
Bugfix tested on PROD (possibly also by the connection project itself) -
Final communication by Team Operations if necessary -
Internal documentation was checked and updated if necessary -
External documentation has been checked and updated if necessary -
Updated changelog if necessary
Approach/Solution:
Release version of the artifact:
Edited by Martin Vogel