To make devfile v2 validation work, update justify library #18901
Labels
area/che-server
kind/bug
Outline of a bug - must adhere to the bug report template.
severity/P2
Has a minor but important impact to the usage or development of the system.
Describe the bug
We currently use
org.leadpony.justify:justify:0.14.0
for devfile schema validation. However, this version fails to read devfile 2.0 schema (https://github.com/devfile/api/releases/tag/v2.0.0). It fails when parsing the version regex:fails on this https://github.com/devfile/api/blob/2.0.x/schemas/latest/devfile.json#L1472
Steps to reproduce
reproducer: https://gist.githubusercontent.com/sparkoo/a395f98a6c5ffead01f816890f6ea445/raw/cfe531301d11545cb0271cba083f771b62d99dfd/JsonSchemaFail.java
You can use jbang to run the reproducer, just download the file and run
docker run -v
pwd:/ws:z --workdir=/ws quay.io/jbangdev/jbang-action JsonSchemaFail.java
Expected behavior
To make devfile 2.0 schema validation working, we must have library that is capable to work with the schema. The latest version of
justify
3.1.0
seems to work fine -> https://gist.githubusercontent.com/sparkoo/a395f98a6c5ffead01f816890f6ea445/raw/cfe531301d11545cb0271cba083f771b62d99dfd/JsonSchemaPass.java (same code just different dependency)Be aware that new version now depends on
org.glassfish:jakarta.json
instead oforg.glassfish:javax.json
.Additional context
The text was updated successfully, but these errors were encountered: