version 0.7 - BREAKING changes#33
Merged
Artifizer merged 5 commits intoGlobalTypeSystem:mainfrom Dec 22, 2025
Merged
Conversation
BREAKING CHANGE: Entity classification now strictly follows the rule that a JSON document is a schema if and only if it has a "$schema" field. This commit implements a clear distinction between 5 categories of GTS entities: 1. **GTS Schemas** - Have `$schema` field + `$id` with `gts://...~` format 2. **Non-GTS Schemas** - Have `$schema` but no valid GTS `$id` (unsupported) 3. **Well-Known Instances** - No `$schema`, `id` field contains GTS ID with chain 4. **Anonymous Instances** - No `$schema`, `id` field contains UUID, `type` field has GTS schema ID 5. **Unknown Instances** - No `$schema`, no identifiable schema (unsupported) - **Before**: Schema detection used multiple heuristics (ID ending with `~`, `$id` field, `$schema` URL patterns) - **After**: A document is a schema **if and only if** it has a `$schema` field
…ef errors Document that JSON Schema $ref should be URI-compatible with gts://, same as $id, and trimmed back to canonical gts.a.b.c.d... for resolution/registry keys. Update OP#7 relationship-resolution fixtures to use gts:// for all schema refs. Add OP#7 tests asserting POST /entities?validate=true returns 422 for: $ref that is not gts://... $ref that has gts:// but contains a malformed GTS identifier Signed-off-by: Artifizer <artifizer@gmail.com>
Signed-off-by: Artifizer <artifizer@gmail.com>
Signed-off-by: Artifizer <artifizer@gmail.com>
This was referenced Dec 22, 2025
KvizadSaderah
added a commit
to KvizadSaderah/gts-python
that referenced
this pull request
Dec 23, 2025
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 - Add validation in validate_schema() method 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 - Reject malformed GTS IDs after gts:// prefix - 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>
KvizadSaderah
added a commit
to KvizadSaderah/gts-python
that referenced
this pull request
Dec 23, 2025
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>
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.
New breaking changes:
doc: recommend gts:// in JSON Schema $ref; tests: enforce invalid $ref errors
doc: strict schema/instance distinction based on $schema field