diff --git a/schema/statement.json b/schema/statement.json index b59bbdb9..2a01b9de 100644 --- a/schema/statement.json +++ b/schema/statement.json @@ -226,7 +226,8 @@ "statementPointerTarget": { "title": "Statement Fragment Pointer", "description": "An RFC6901 JSON Pointer (https://tools.ietf.org/html/rfc6901) describing the target fragment of the statement that this Annotation applies to, starting from the root of the Statement. An empty string (\"\") indicates that the Annotation applies to the whole Statement.", - "type": "string" + "type": "string", + "format": "json-pointer" }, "creationDate": { "title": "Creation Date", diff --git a/tests/data/invalid-statements/expected_errors.csv b/tests/data/invalid-statements/expected_errors.csv index bb954f8c..550562fd 100644 --- a/tests/data/invalid-statements/expected_errors.csv +++ b/tests/data/invalid-statements/expected_errors.csv @@ -15,6 +15,7 @@ person_names_fullName_missing.json,required,$[0].recordDetails.names[0],fullName person_taxResidencies_no_object.json,type,$[0].recordDetails.taxResidencies,taxResidencies person_addresses_no_array.json,type,$[0].recordDetails.addresses,addresses statement_annotations_statementPointerTarget_type.json,type,$[0].annotations[0].statementPointerTarget,statementPointerTarget +statement_annotations_statementPointerTarget_format.json,format,$[0].annotations[0].statementPointerTarget,statementPointerTarget entity_address_not_string.json,type,$[0].recordDetails.addresses[0].address,address entity_postcode_not_string.json,type,$[0].recordDetails.addresses[0].postCode,postCode entity_address_country_name_not_string.json,type,$[0].recordDetails.addresses[0].country.name,name diff --git a/tests/data/invalid-statements/statement_annotations_statementPointerTarget_format.json b/tests/data/invalid-statements/statement_annotations_statementPointerTarget_format.json new file mode 100644 index 00000000..e43234c6 --- /dev/null +++ b/tests/data/invalid-statements/statement_annotations_statementPointerTarget_format.json @@ -0,0 +1,21 @@ +[ + { + "statementId": "2f7bf9370f1254068e5e946df067d07d", + "declarationSubject": "xyz", + "statementDate": "2017-11-18", + "annotations": [ + { + "statementPointerTarget": "recordDetails/interestedParty", + "motivation": "identifying" + } + ], + "recordId": "123", + "recordType": "entity", + "recordDetails": { + "entityType": { + "type": "unknownEntity" + }, + "isComponent": false + } + } +]