Merged
Conversation
Implement Issues #25, #31, #32 from gts-spec v0.7: Issue #25: Never use GTS ID in $schema - Strict validation in _is_json_schema_entity() - Reject gts.* IDs and gts:// URIs in $schema field - Only JSON Schema URLs allowed Issue #31: Normalize gts:// prefix in $id - Strip gts:// prefix in _get_field_value() - Applies to all entity_id_fields and schema_id_fields - Automatic normalization during ID extraction Issue #32: Strict $ref validation with gts:// requirement - Add _validate_schema_refs() static method - Require gts:// prefix for external GTS refs - Allow local JSON Pointer refs (#/definitions/...) - Reject bare GTS IDs and HTTP/HTTPS refs - Integrate into validate_schema() as first validation step Reference implementations: - gts-rust PR #19: GlobalTypeSystem/gts-rust#19 - gts-spec PR #33: GlobalTypeSystem/gts-spec#33 Signed-off-by: Dmitrii Efremov <kaidendev@icloud.com>
Update 4 tests in test_entities.py to reflect Issue #25 changes: - test_default_config: $schema no longer in schema_id_fields - test_entity_schema_detection_gts_uri: gts:// in $schema NOT recognized as schema - test_entity_schema_detection_gts_prefix: gts. prefix in $schema NOT recognized as schema - test_entity_schema_id_calculation: use 'type' field instead of $schema These tests were checking old behavior (pre-v0.7) where GTS IDs could be used in $schema field. Per Issue #25, only JSON Schema URLs are allowed in $schema. All 108 tests pass. Signed-off-by: Dmitrii Efremov <kaidendev@icloud.com>
915b277 to
4530fde
Compare
Artifizer
approved these changes
Dec 23, 2025
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.
Description
Implementation of gts-spec v0.7 breaking changes for Python.
Related Issues
Closes GlobalTypeSystem/gts-spec#25
Closes GlobalTypeSystem/gts-spec#31
Closes GlobalTypeSystem/gts-spec#32
Changes
Issue #25: Never use GTS ID in $schema
gts.*andgts://URIshttp://json-schema.org/...) allowedIssue #31: Normalize gts:// prefix in $id
gts://prefix automatically when parsing ID fieldsentity_id_fieldsandschema_id_fieldsIssue #32: Strict $ref validation
gts://prefix for external GTS schema references#/definitions/...)Testing
python test_changes.py -v)Reference Implementations