json-schema-org/understanding-json-schema

Have not mentioned `id`

miloyip opened this issue · 2 comments

I found that id was never mentioned in this book. Actually I have difficulties in understanding that part in spec during implementation of a validator. Is there a plan for covering it?

By the way, this book is very useful for me to learn json schema in short time. Thank you.

Oh, thanks for pointing this out. I double checked and indeed there does not seem to be any reference to it--a glaring omission.

In short, the "id" keyword is just a self-reference for the schema. It should be a URI, preferably where the schema itself can be found, and so it serves as a globally-unique identifier for the schema (which can be used in conjunction with $ref, which also deserves a chapter in the book).

I take it back regarding $ref; it is discussed here: http://spacetelescope.github.io/understanding-json-schema/structuring.html but id is not.