From 927772491c4790066ee8479683e74571b08f94b4 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Wed, 10 Apr 2024 18:08:46 -0400 Subject: [PATCH] Fix bundling example --- Makefile | 2 +- doc/jsonschema.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 02e94fa..a9866a4 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ DISTVERSION = $(shell perl -nE '/^version\s*=\s*"([^"]+)/ && do { say $$1; exit PGRXV = $(shell perl -nE '/^pgrx\s+=\s"=?([^"]+)/ && do { say $$1; exit }' Cargo.toml) PGV = $(shell perl -E 'shift =~ /(\d+)/ && say $$1' "$(shell $(PG_CONFIG) --version)") -.DEFAULT_GOAL: package # Build jsonshcmea for the PostgreSQL cluster identified by pg_config. +.DEFAULT_GOAL: package # Build jsonschmea for the PostgreSQL cluster identified by pg_config. package: @cargo pgrx package --pg-config "$(PG_CONFIG)" diff --git a/doc/jsonschema.md b/doc/jsonschema.md index 5d5443d..a63cd91 100644 --- a/doc/jsonschema.md +++ b/doc/jsonschema.md @@ -210,8 +210,8 @@ SELECT '{ }, "required": ["first_name", "last_name", "shipping_address", "billing_address"], "$defs": { - "address": { - "$id": "/schemas/address", + "https://example.com/schemas/address": { + "$id": "https://example.com/schemas/address", "type": "object", "properties": { "street_address": { "type": "string" }, @@ -225,8 +225,8 @@ SELECT '{ ``` Note that the only change to the address schema is tha it has been embedded in -the `$defs` object and its `$id` is no longer fully-qualified. Now with this -one bundled schema, we can omit the `id` parameter: +the `$defs` object using its `$id` for the key. With this schema bundle, we +can omit the `id` parameter: ```psql SELECT jsonschema_is_valid(:'cust_schema'::json);