The short answer is, you cannot do that. "description", which is the
closest to what you would want, is a "first level" object of a schema
and applies to the schema itself.
The long answer is, if you use a JSON parser which supports C++-style
comments (which are normally not legal in JSON) then you may add
comments to describe your enum values. But your schema would then
become unusable by third parties -- because they won't be JSON
anymomre.
--
Francis Galiegue, fgal...@gmail.com
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)
But the "enum" keyword does that already. In fact, you don't even need
the "type" in this case, just:
{ "enum": [ "22PC","42GP","45GP","45UP","22GP" ] }
"enum" lists the possible values for the JSON node at this point, you
may have any valid JSON fragment in an enum:
{ "enum": [ 4, null, false, 2.02, [ 3, "helloworld" ] ] }
Please remember that keys in a JSON Object MUST be strings: { "type":
[ { "enum": blablabla
Otherwise your input is not valid JSON.