understanding-json-schema icon indicating copy to clipboard operation
understanding-json-schema copied to clipboard

Enhance generic keywords section with information on where they can be used

Open ldexterldesign opened this issue 6 years ago • 3 comments

Hi all,

Thanks for software

Hope you're well

This [e]xchange between @handrews and myself basically recommending there be some indication of where [g]eneric keywords may be used, something to the effect of:

You can put annotations in any schema object, like pretty much every other keyword, you just can’t put the same keyword in the same object more than once...

Happy to PR something if there's agreement?

If you have any issues (e.g. questions/queries) then happy to help

Hope this helps

Keep up sterling work!

Regards

e: https://json-schema.slack.com/archives/C5CF75URH/p1550863159049600?thread_ts=1550803000.035900&cid=C5CF75URH g: https://json-schema.org/understanding-json-schema/reference/generic.html annotations (i.e. title, description, default, examples), comments (i.e. $comment), enumerated (i.e. enum), constant (i.e. const)

ldexterldesign avatar Mar 20 '19 15:03 ldexterldesign

BUMP

ldexterldesign avatar Mar 23 '20 04:03 ldexterldesign

I think it would be even simpler and clearer to write something like:

Generic annotation keywords may be used in any schema, including sub-schemas.

Basically anywhere a schema is allowed, annotation keywords may be used in that schema.

embray avatar Mar 24 '20 16:03 embray

Hi @embray,

Thanks for reply

How about:

Generic annotation keywords may be used in any schema object, including sub-schemas. Like all(?) other keywords they may be used once per object.

Hope to hear back

Sincerely

ldexterldesign avatar Mar 24 '20 18:03 ldexterldesign