Skip to content

Commit b34ca2c

Browse files
committed
chore: support gts-spec v0.14.2
Adopt batch Type Schema registration and derive each type identifier from canonical embedded metadata. Pin the conformance submodule to v0.14.2, bump the breaking package release, and regenerate the OpenAPI document. Signed-off-by: Artifizer <artifizer@gmail.com>
1 parent 0bce0fc commit b34ca2c

9 files changed

Lines changed: 461 additions & 152 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
A minimal, idiomatic Python library for working with **GTS** ([Global Type System](https://github.com/gts-spec/gts-spec)) identifiers and JSON/JSON Schema artifacts.
66

7-
Current supported GTS spec version: `0.14.1`
7+
Current supported GTS spec version: `0.14.2`
88

99
## Roadmap
1010

‎gts/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Python helpers and a reference HTTP service for the [Global Type System (GTS)](https://github.com/globaltypesystem/gts-spec). The package supports GTS identifier parsing, JSON Schema-backed validation, schema compatibility and derivation checks, traits, casting, queries, file loading, a CLI, and a FastAPI application.
44

5-
The package targets GTS specification v0.14.1 and requires Python 3.9 or later.
5+
The package targets GTS specification v0.14.2 and requires Python 3.9 or later.
66

77
## Installation
88

@@ -185,7 +185,7 @@ ops.reload_from_path("replacement-directory")
185185

186186
ops.add_entity(content, validate=False)
187187
ops.add_entities([content_a, content_b])
188-
ops.add_schema(type_id, schema)
188+
ops.add_schemas([schema_a, schema_b])
189189
ops.extract_id(content)
190190
ops.validate_id(gts_id)
191191
ops.parse_id(gts_id)
@@ -268,7 +268,7 @@ app = GtsHttpServer(ops=GtsOps()).app
268268
| `/entities/{gts_id}` | `GET` | Retrieves one entity. |
269269
| `/entities` | `POST` | Entity/schema body; optional `validate=true` runs full validation. Failed registration returns 422 and is rolled back. |
270270
| `/entities/bulk` | `POST` | JSON array of entity/schema objects. |
271-
| `/type-schemas` | `POST` | `{"type_id": "...~", "type_schema": {...}}`. |
271+
| `/type-schemas` | `POST` | JSON array of GTS Type Schema objects (batch); each entry's `type_id` is derived from its embedded `$id`. Returns `{"ok": ..., "results": [{"ok": ..., "type_id": ..., "error": ...}]}`. |
272272
| `/validate-id` | `GET` | `gts_id` query parameter. |
273273
| `/extract-id` | `POST` | JSON entity/schema object. |
274274
| `/parse-id` | `GET` | `gts_id` query parameter. |

0 commit comments

Comments
 (0)