Add json-pointer format to statementPointerTarget#758
Open
StephenAbbott wants to merge 1 commit intomainfrom
Open
Add json-pointer format to statementPointerTarget#758StephenAbbott wants to merge 1 commit intomainfrom
StephenAbbott wants to merge 1 commit intomainfrom
Conversation
The statementPointerTarget property on the Annotation object is described as an RFC6901 JSON Pointer. Adding "format": "json-pointer" lets validators reject strings that are not well-formed pointers. Also adds a test fixture exercising the new format constraint. Fixes #707.
Collaborator
|
Thanks, @StephenAbbott . This edit will require some work our end so I'll tag it as a good PR to start with if there's a future round of development on the schema. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #707.
The
statementPointerTargetproperty on theAnnotationobject is described as an RFC6901 JSON Pointer but the schema only constrained it totype: string. This adds"format": "json-pointer"so validators reject values that are not well-formed pointers (e.g. missing leading/or containing invalid~escapes).Change in
schema/statement.json:"statementPointerTarget": { "title": "Statement Fragment Pointer", "description": "An RFC6901 JSON Pointer ...", - "type": "string" + "type": "string", + "format": "json-pointer" },Test plan
tests/data/invalid-statements/statement_annotations_statementPointerTarget_format.jsonwith an invalid pointer (missing leading/)tests/data/invalid-statements/expected_errors.csvpytest tests/test_data.py— new test passes; no new failures (pre-existing 12 format-related failures onmainin the local sandbox are environmental and unchanged here)"",/recordDetails/...,/statementDate) so none break under the new constrainthttps://claude.ai/code/session_019ksAaAodXk1wNCLcuEVkXC
Generated by Claude Code