Skip to content

Commit 884fc76

Browse files
committed
URI change
Signed-off-by: Clemens Vasters <clemens@vasters.com>
1 parent 7e5d86d commit 884fc76

File tree

6 files changed

+150
-150
lines changed

6 files changed

+150
-150
lines changed

json-structure-primer.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Example:
148148

149149
```json
150150
{
151-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
151+
"$schema": "https://json-structure.org/meta/core/v0/#",
152152
"definitions" : {
153153
"AddressBase": {
154154
"abstract": true,
@@ -200,7 +200,7 @@ might be applied to any _StreetAddress_ types in a document:
200200

201201
```json
202202
{
203-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
203+
"$schema": "https://json-structure.org/meta/core/v0/#",
204204
"$id": "https://schemas.vasters.com/Addresses",
205205
"$root": "#/definitions/StreetAddress",
206206
"$offers": {
@@ -310,13 +310,13 @@ shadowing definitions from the imported meta-schema.
310310
The ["core" meta-schema](./json-schema-core-metaschema-core.json) formally
311311
defines the elements described in the [JSON Structure Core][JSTRUCT-CORE]
312312
document. The "$id" of the core meta-schema is
313-
`https://json-structure.github.io/meta/core/v0`.
313+
`https://json-structure.org/meta/core/v0`.
314314

315315
The ["extended" meta-schema](./json-schema-metaschema-extended.json) extends the
316316
core meta-schema with all additional features and capabilities provided by the
317317
companion specifications and offers those features to schema authors. The "$id"
318318
of the extended meta-schema is
319-
`https://json-structure.github.io/meta/extended/v0`.
319+
`https://json-structure.org/meta/extended/v0`.
320320

321321
The ["validation" meta-schema](./json-schema-metaschema-validation.json) enables
322322
all add-ins defined in the extended meta-schema.
@@ -331,7 +331,7 @@ Here is an example of a simple object type definition:
331331

332332
```json
333333
{
334-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
334+
"$schema": "https://json-structure.org/meta/core/v0/#",
335335
"type": "object",
336336
"name": "Person",
337337
"properties": {
@@ -361,7 +361,7 @@ extended types:
361361

362362
```json
363363
{
364-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
364+
"$schema": "https://json-structure.org/meta/core/v0/#",
365365
"type": "object",
366366
"name": "UserProfile",
367367
"properties": {
@@ -390,7 +390,7 @@ type cannot be referenced from other types in the schema.
390390

391391
```json
392392
{
393-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
393+
"$schema": "https://json-structure.org/meta/core/v0/#",
394394
"type": "object",
395395
"name": "UserProfile",
396396
"properties": {
@@ -423,7 +423,7 @@ that can be referenced by other types in the same document. Here is an example:
423423

424424
```json
425425
{
426-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
426+
"$schema": "https://json-structure.org/meta/core/v0/#",
427427
"type": "object",
428428
"name": "UserProfile",
429429
"properties": {
@@ -464,7 +464,7 @@ namespaces to structure your types, with two differing `Address` types:
464464

465465
```json
466466
{
467-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
467+
"$schema": "https://json-structure.org/meta/core/v0/#",
468468
"type": "object",
469469
"name": "UserProfile",
470470
"properties": {
@@ -507,7 +507,7 @@ different from defining an object:
507507

508508
```json
509509
{
510-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
510+
"$schema": "https://json-structure.org/meta/core/v0/#",
511511
"type": "array",
512512
"items": { "type": "string" }
513513
}
@@ -518,7 +518,7 @@ not reference the type from elsewhere in the schema:
518518

519519
```json
520520
{
521-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
521+
"$schema": "https://json-structure.org/meta/core/v0/#",
522522
"type": "array",
523523
"items": {
524524
"type": "object",
@@ -536,7 +536,7 @@ To declare an array of a reusable type, you can use the `$ref` keyword:
536536

537537
```json
538538
{
539-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
539+
"$schema": "https://json-structure.org/meta/core/v0/#",
540540
"type": "array",
541541
"items": { "type" : { "$ref": "#/definitions/Person" } },
542542
"definitions": {
@@ -560,7 +560,7 @@ This example shows how to declare a map of strings to `Color` objects:
560560

561561
```json
562562
{
563-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
563+
"$schema": "https://json-structure.org/meta/core/v0/#",
564564
"type": "map",
565565
"values": { "type": { "$ref": "#/definitions/Color" } },
566566
"definitions": {
@@ -597,7 +597,7 @@ This example shows how to declare a set of strings:
597597

598598
```json
599599
{
600-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
600+
"$schema": "https://json-structure.org/meta/core/v0/#",
601601
"type": "set",
602602
"items": { "type": "string" }
603603
}
@@ -616,7 +616,7 @@ The JSON Structure Core specification is designed to be extensible through
616616
companion specifications that provide additional features and capabilities.
617617

618618
The extended schema that includes all companion specifications is identified by
619-
the `https://json-structure.github.io/meta/extended/v0` URI. Each companion
619+
the `https://json-structure.org/meta/extended/v0` URI. Each companion
620620
specification is identified by a unique identifier that can be used in the
621621
`$uses` attribute to activate the companion specification for the schema
622622
document.
@@ -642,7 +642,7 @@ Here is an example of how to use the `altnames` keyword:
642642

643643
```json
644644
{
645-
"$schema": "https://json-structure.github.io/meta/extended/v0/#",
645+
"$schema": "https://json-structure.org/meta/extended/v0/#",
646646
"$uses": ["JSONStructureAlternateNames"],
647647
"Person": {
648648
"type": "object",
@@ -697,7 +697,7 @@ Here is an example of how to use the `altenums` keyword:
697697

698698
```json
699699
{
700-
"$schema": "https://json-structure.github.io/meta/extended/v0/#",
700+
"$schema": "https://json-structure.org/meta/extended/v0/#",
701701
"$uses": ["JSONStructureAlternateNames"],
702702
"type": "object",
703703
"name": "Color",
@@ -740,7 +740,7 @@ Here is an example of how to use the `unit` keyword:
740740

741741
```json
742742
{
743-
"$schema": "https://json-structure.github.io/meta/extended/v0/#",
743+
"$schema": "https://json-structure.org/meta/extended/v0/#",
744744
"$uses": ["JSONStructureUnits"],
745745
"type": "object",
746746
"name": "Pressure",
@@ -767,7 +767,7 @@ Here is an example of how to use the `currency` keyword:
767767

768768
```json
769769
{
770-
"$schema": "https://json-structure.github.io/meta/extended/v0/#",
770+
"$schema": "https://json-structure.org/meta/extended/v0/#",
771771
"$uses": ["JSONStructureUnits"],
772772
"type": "object",
773773
"name": "Price",

samples/py/json_structure_instance_validator.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Extensions such as "JSONStructureAlternateNames" or "JSONStructureUnits" are generally ignored for validation.
1313
1414
Furthermore, when the root schema’s "$schema" equals
15-
"https://json-structure.github.io/meta/extended/v0/#"
15+
"https://json-structure.org/meta/extended/v0/#"
1616
all addins (i.e. all keys offered in "$offers") are automatically enabled.
1717
1818
This implementation also supports extended validation keywords as defined in the
@@ -80,7 +80,7 @@ def validate_instance(self, instance, schema=None, path="#", meta=None):
8080
schema = self.root_schema
8181

8282
# --- Automatically enable all addins if using extended metaschema ---
83-
if self.root_schema.get("$schema") == "https://json-structure.github.io/meta/extended/v0/#":
83+
if self.root_schema.get("$schema") == "https://json-structure.org/meta/extended/v0/#":
8484
# Automatically enable all addins offered in the root schema.
8585
all_addins = ["JSONStructureConditionalComposition", "JSONStructureValidation", "JSONStructureUnits", "JSONStructureAlternateNames"]
8686
schema.setdefault("$uses", [])
@@ -89,7 +89,7 @@ def validate_instance(self, instance, schema=None, path="#", meta=None):
8989
schema["$uses"].append(addin)
9090
# [Metaschema: Extended metaschema automatically enables all addins]
9191

92-
if isinstance(instance, dict) and "$uses" in instance and self.root_schema.get("$schema") == "https://json-structure.github.io/meta/validation/v0/#":
92+
if isinstance(instance, dict) and "$uses" in instance and self.root_schema.get("$schema") == "https://json-structure.org/meta/validation/v0/#":
9393
# Automatically enable the JSONStructureValidation addin.
9494
schema.setdefault("$uses", [])
9595
if "JSONStructureValidation" in instance["$uses"] and not "JSONStructureValidation" in schema["$uses"]:
@@ -98,9 +98,9 @@ def validate_instance(self, instance, schema=None, path="#", meta=None):
9898
schema["$uses"].append("JSONStructureConditionalComposition")
9999
# [Metaschema: JSONStructureValidation metaschema automatically enables JSONStructureValidation addin]
100100

101-
# the core schema https://json-structure.github.io/meta/validation/v0/# has no JSONStructureConditionalComposition or JSONStructureValidation addins
101+
# the core schema https://json-structure.org/meta/validation/v0/# has no JSONStructureConditionalComposition or JSONStructureValidation addins
102102
# an instance referencing these addins will be rejected
103-
if isinstance(instance, dict) and "$uses" in instance and self.root_schema.get("$schema") == "https://json-structure.github.io/meta/core/v0/#":
103+
if isinstance(instance, dict) and "$uses" in instance and self.root_schema.get("$schema") == "https://json-structure.org/meta/core/v0/#":
104104
if "JSONStructureValidation" in instance["$uses"] or "JSONStructureConditionalComposition" in instance["$uses"]:
105105
self.errors.append(
106106
f"Instance at {path} references JSONStructureConditionalComposition or JSONStructureValidation addins but the schema does not support them")
@@ -667,7 +667,7 @@ def _fetch_external_schema(self, uri):
667667
return None
668668
SIMULATED_SCHEMAS = {
669669
"https://example.com/people.json": {
670-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
670+
"$schema": "https://json-structure.org/meta/core/v0/#",
671671
"$id": "https://example.com/people.json",
672672
"name": "Person",
673673
"type": "object",
@@ -688,7 +688,7 @@ def _fetch_external_schema(self, uri):
688688
}
689689
},
690690
"https://example.com/importdefs.json": {
691-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
691+
"$schema": "https://json-structure.org/meta/core/v0/#",
692692
"$id": "https://example.com/importdefs.json",
693693
"definitions": {
694694
"LibraryType": {

samples/py/json_structure_schema_validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _fetch_external_schema(self, uri):
196196
# Simulated external schemas for testing purposes.
197197
EXTERNAL_SCHEMAS = {
198198
"https://example.com/people.json": {
199-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
199+
"$schema": "https://json-structure.org/meta/core/v0/#",
200200
"$id": "https://example.com/people.json",
201201
"name": "Person",
202202
"type": "object",
@@ -217,7 +217,7 @@ def _fetch_external_schema(self, uri):
217217
}
218218
},
219219
"https://example.com/address.json": {
220-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
220+
"$schema": "https://json-structure.org/meta/core/v0/#",
221221
"$id": "https://example.com/address.json",
222222
"name": "Address",
223223
"type": "object",

samples/py/test_import.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_import_with_temp_files(tmp_path):
1515
"""
1616
# Define external schemas.
1717
external_schema_person = {
18-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
18+
"$schema": "https://json-structure.org/meta/core/v0/#",
1919
"$id": "https://example.com/schema/person",
2020
"name": "Person",
2121
"type": "object",
@@ -25,7 +25,7 @@ def test_import_with_temp_files(tmp_path):
2525
}
2626
}
2727
external_schema_address = {
28-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
28+
"$schema": "https://json-structure.org/meta/core/v0/#",
2929
"$id": "https://example.com/schema/address",
3030
"$root": "#/definitions/Address",
3131
"definitions": {
@@ -47,7 +47,7 @@ def test_import_with_temp_files(tmp_path):
4747

4848
# Create a local schema that uses $import and $importdefs.
4949
local_schema = {
50-
"$schema": "https://json-structure.github.io/meta/core/v0/#",
50+
"$schema": "https://json-structure.org/meta/core/v0/#",
5151
"$id": "https://example.com/schema/local",
5252
"name": "LocalSchema",
5353
"type": "object",

0 commit comments

Comments
 (0)