CamelCase Defs #448
mscuthbert
started this conversation in
Ideas
Replies: 1 comment
-
|
One other proposed change: move the schema out of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(Initial discussion Superseded; see below the line for current discussion)
(from discussion #446)
In the JSON Schema, currently a reference in `$defs` for an object-type (Class) is only made on the second usage. I propose that the `$defs` reference be created on first usage. Why?- Every object-type currently has a name in the Django/sqllite database and this is referenced in the docs. However, these names are not exposed in the Schema except for objects with 2+ usages. This change would make either the schema or the Django reference a point of truth (p.s. -- I hope that eventually the schema can be considered the main point of truth).
- In the Typing of objects #446 discussion, names for classes of objects are becoming important for many users -- putting the name of an object-class near the object-class definition seems very valuable.
- According to "Understanding JSON Schema": "the
$defskeyword gives us a standardized place to keep subschemas intended for reuse in the current schema document" -- because objects can be identified by id, etc. they should be considered intended for reuse even if we haven't yet used them twice in the document.I wrote all this and now I see that this has been done with the vendors and
_xwork! WOW! Yes! I'll keep this for justification in case it's challenged.With this notion that object names might be used as class names, I also propose that hyphens be removed from
$defsreferences -- at least for{}objects if not also things likepositive-integer-- and that camelCase or ObjectCase be used instead. This will help find odd usages like the present"multimeasureRests": {"$ref": "#/$defs/multimeasure-rests"}I also think it's probably helpful to change the current
rootto_rootor_mnxrootso that the starting definition for the entire doctree is at the beginning rather than happening to be betweenrhythmic-positionandscore-- yes, we're not optimizing for human reading, but even today's AIs will prioritize things at the beginning. when summarizing, and I'm certainly not the last human to look at the schema.Beta Was this translation helpful? Give feedback.
All reactions