-
Notifications
You must be signed in to change notification settings - Fork 206
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
[KOGITO-9501] Changing Everit to json-schema-validator #3107
Conversation
(tests) - kogito-runtimes job Reproducerexport BUILD_MVN_OPTS_CURRENT=-T 1C -Dvalidate-formatting -Prun-code-coverage NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Test results:
Those are the test failures: org.kie.kogito.quarkus.workflows.ExpressionRestIT.testExpressionOutputValidation1 expectation failed.JSON path message doesn't match. Expected: a string containing "required key [message] not found" Actual: java.lang.IllegalArgumentException - Validation errors com.github.fge.jsonschema.core.report.ListProcessingReport: failure\n--- BEGIN MESSAGES ---\nerror: object has missing required properties ([\"message\"])\n level: \"error\"\n schema: {\"loadingURI\":\"#\",\"pointer\":\"\"}\n instance: {\"pointer\":\"\"}\n domain: \"validation\"\n keyword: \"required\"\n required: [\"message\",\"result\"]\n missing: [\"message\"]\n--- END MESSAGES ---\n |
(tests) - kogito-runtimes job Reproducerexport BUILD_MVN_OPTS_CURRENT=-T 1C -Dvalidate-formatting -Prun-code-coverage NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Test results:
Those are the test failures: org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testFindByIdReadModeexpected: 5 but was: 0 org.kie.kogito.quarkus.workflows.ExpressionRestIT.testExpressionOutputValidation1 expectation failed.JSON path message doesn't match. Expected: a string containing "required key [message] not found" Actual: java.lang.IllegalArgumentException - Validation errors com.github.fge.jsonschema.core.report.ListProcessingReport: failure\n--- BEGIN MESSAGES ---\nerror: object has missing required properties ([\"message\"])\n level: \"error\"\n schema: {\"loadingURI\":\"#\",\"pointer\":\"\"}\n instance: {\"pointer\":\"\"}\n domain: \"validation\"\n keyword: \"required\"\n required: [\"message\",\"result\"]\n missing: [\"message\"]\n--- END MESSAGES ---\n |
(tests) - kogito-apps job Reproducerexport BUILD_MVN_OPTS_CURRENT= NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Test results:
Those are the test failures: Build projects / org.kie.kogito.it.jobs.MultipleTimerInstancesIT.boundaryTimerEventFailed to load ApplicationContext |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to remove commons?
Apparently, see https://github.com/networknt/json-schema-validator#dependency-1 |
* [KOGITO-9501] Changing JsonSchema validator library * [KOGITO-9501] Different validation message * [KOGITO-9501] Changing to networknt library
* [KOGITO-9501] Changing JsonSchema validator library * [KOGITO-9501] Different validation message * [KOGITO-9501] Changing to networknt library
Using jackson validator rather than gson one.
In order gson one to dissapear completely, we need PR to remove it from Java SDK.
There is also another subttle change in behaviour (for good). This jackson API allows us to distinghish between a validation failure of the schema against the data (that might or not be ignored as per spec) and a failure parsing the schema itself (which in my opinion should be propagated always because there is a fatal configuration error that requires user intervention, for example, a bad formatted schema file or an unavailable one) .