extends example in draft 03 has a bug

125 views
Skip to first unread message

Martijn Faassen

unread,
Nov 13, 2010, 5:35:12 PM11/13/10
to json-...@googlegroups.com
Hi there,

I think the extends example still follows the non-$ref way to refer to
another schema:

{
"description":"An adult",
"properties":{"age":{"minimum": 21}},
"extends":"person"
}

Shouldn't this be this?

{
"description":"An adult",
"properties":{"age":{"minimum": 21}},
"extends": { '$ref': 'person' }
}

(I'm not sure how 'person' is supposed to resolve; I suppose this
schema is assumed to be on a URL that has a relative url 'person'.)

I am also not quite sure how to read this (the second part of the example):

{
"description":"Extended schema",
"properties":{"deprecated":{"type": "boolean"}},
"extends":"http://json-schema.org/draft-03/schema"
}

Again, the 'extends' is not using $ref, and I also don't understand
the URL it points to. Plus if this is the extended schema, why does it
extend itself? That only leads to confusion in an example, right?

Regards,

Martijn

Gary Court

unread,
Nov 14, 2010, 4:10:37 PM11/14/10
to json-...@googlegroups.com
My bad, I missed these while updating the referencing spec. I'll get them fixed.

-Gary

> --
> You received this message because you are subscribed to the Google Groups "JSON Schema" group.
> To post to this group, send email to json-...@googlegroups.com.
> To unsubscribe from this group, send email to json-schema...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/json-schema?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages