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

draftv4/schema is different between json-schema-validator 2.2.14 and json-schema-core 1.2.14 #401

Open
nomoa opened this issue Aug 5, 2022 · 2 comments · May be fixed by #414
Open

draftv4/schema is different between json-schema-validator 2.2.14 and json-schema-core 1.2.14 #401

nomoa opened this issue Aug 5, 2022 · 2 comments · May be fixed by #414

Comments

@nomoa
Copy link

nomoa commented Aug 5, 2022

Hi,
we noticed this when bumping to json-schema-validator 2.2.14, we use duplicate-finder-maven-plugin to track jar hell (we build a fat jar) and it appears that the draftv4/schema resource is slightly different in these two projects:

--- json-schema-core-1.2.14-draftv4
+++ json-schema-validator-2.2.14-draftv4
@@ -28,10 +28,12 @@
     "type": "object",
     "properties": {
         "id": {
-            "type": "string"
+            "type": "string",
+            "format": "uri"
         },
         "$schema": {
-            "type": "string"
+            "type": "string",
+            "format": "uri"
         },
         "title": {
             "type": "string"
@@ -135,7 +137,6 @@
                 }
             ]
         },
-        "format": { "type": "string" },
         "allOf": { "$ref": "#/definitions/schemaArray" },
         "anyOf": { "$ref": "#/definitions/schemaArray" },
         "oneOf": { "$ref": "#/definitions/schemaArray" },

Thanks!

@ottomata
Copy link

Very strange that these are different! I'd assume draft4/schema should be verbatim from jsonschema spec.

It looks like the format line should be included.
https://json-schema.org/draft-04/schema

ottomata added a commit to ottomata/json-schema-validator that referenced this issue Jul 17, 2024
ottomata added a commit to ottomata/json-schema-validator that referenced this issue Jul 17, 2024
@ottomata
Copy link

Submitted MR to fix. Latest commit on this repo is 4 years ago though... Dunno if anyone is listening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants