From 75e27cbdcae4770c9fa178a92e30e7125fe313f7 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 23 May 2025 00:11:45 +0200 Subject: [PATCH 1/2] Fix schema_catalog_schema.json This makes it possible to validate _the `catalog` field` of_ `json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json`. It matches exactly the changes I've made in my adaptation, https://github.com/roberth/json-schema-catalog-rs --- .../src/main/resources/schema_catalog_schema.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json-schema-catalog/catalog-core/src/main/resources/schema_catalog_schema.json b/json-schema-catalog/catalog-core/src/main/resources/schema_catalog_schema.json index 6e6861fd6..e620103d5 100644 --- a/json-schema-catalog/catalog-core/src/main/resources/schema_catalog_schema.json +++ b/json-schema-catalog/catalog-core/src/main/resources/schema_catalog_schema.json @@ -25,7 +25,7 @@ "type": "string" }, "location": { - "location": "string" + "type": "string" } }, "additionalProperties": false, @@ -40,7 +40,7 @@ "required": [ "baseLocation", "name", - "schema" + "schemas" ] } } @@ -48,6 +48,6 @@ "additionalProperties": false, "required": [ "name", - "group" + "groups" ] } From 785c4bb5348171d37d970668e4dfb572b3fd2730 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 22 Jun 2025 10:52:56 +0200 Subject: [PATCH 2/2] Fix catalog_test_valid.json test sample It does not appear to be referenced by any tests, so I have adapted it to the schema instead of adapting the schema to the instance. Since I can't get the poms to work, I am unable to add a test that validates it. --- .../test/resources/catalog_test_valid.json | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json b/json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json index b8bec69db..866778556 100644 --- a/json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json +++ b/json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json @@ -1,31 +1,29 @@ { - "catalog": { - "name": "my catalog", - "groups": [ - { - "name": "standards", - "baseLocation": "jar://CommonSchemas.jar!//context/schemas", - "schemas": [ - { - "id": "http://justive.gov.uk/standards/complex_addressV1.json", - "location": "standards/complex_addressV1.json" - }, - { - "id": "http://justive.gov.uk/standards/person.json", - "location": "standards/person" - } - ] - }, - { - "name": "staging interface", - "baseLocation": "file:///context/schemas", - "schemas": [ - { - "id": "http://justive.gov.uk/context/exhibitV1.json", - "location": "context/eh.json" - } - ] - } - ] - } + "name": "my catalog", + "groups": [ + { + "name": "standards", + "baseLocation": "jar://CommonSchemas.jar!//context/schemas", + "schemas": [ + { + "id": "http://justive.gov.uk/standards/complex_addressV1.json", + "location": "standards/complex_addressV1.json" + }, + { + "id": "http://justive.gov.uk/standards/person.json", + "location": "standards/person" + } + ] + }, + { + "name": "staging interface", + "baseLocation": "file:///context/schemas", + "schemas": [ + { + "id": "http://justive.gov.uk/context/exhibitV1.json", + "location": "context/eh.json" + } + ] + } + ] }