Can you use 'type' to reference schemas or is this a typo?

94 views
Skip to first unread message

Simon Sprott

unread,
Aug 14, 2022, 4:04:06 AM8/14/22
to JSON Schema
In the example in it shows referencing a 'bundled' schema

https://json-schema.org/draft/2020-12/release-notes.html#embedded-schemas-and-bundling

It shows it like this, but

"postalCode": { "type": "/schema/common#/$defs/usaPostalCode" },

should it be like this ?

"postalCode": { "$ref": "/schema/common#/$defs/usaPostalCode" },

Henry Andrews

unread,
Aug 14, 2022, 2:11:36 PM8/14/22
to JSON Schema
No, that's an error, we should fix that.

-henry

--
You received this message because you are subscribed to the Google Groups "JSON Schema" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-schema...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/json-schema/5962b83c-8658-42c4-8d71-466c435f1069n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages