You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin should be a plugin in the stack after (at least) ref and conditional plugins, as those two are responsible for generating a sometimes position-changing schema, produced from keywords default and if/else handling, with maybe changing render order, depending of the actual data / data-that was there / from-default.
The plugin must order properties inside of schemas, ?nothing else?
Rules for sorting by e.g. sortOrder: ["propA", "propB"]
if properties exist, it should be the keys of the properties
if items exist AND items is an array it should be index keys of the items-schema (array-tuple json-schema)
otherwise, sortOrder will be ignored
if items exists AND items is itself object, the order of the object must be used, not the one of the array
if the to-be-sorted schema-level can not be found (e.g. there is no properties.name for sortOrder: ["name"]) (typeof undefined) the sortOrder must be ignored / no empty schema added in properties
Any not sorted part should be attached after the sorted parts in the same order it was before. A null placeholder can be used to specify where the non-sorted schema parts should be added, only the first found null must "use" the non-sorted schema parts.
The text was updated successfully, but these errors were encountered:
This will be nice to have for our usage, when I get time allocated from my team for this I would love to help develop this plugin and contribute it back
Is there any desire for the null placeholder feature that we're using? I'd be happy to get a PR together for that.
The difference is
"sortOrder": ["one", "three", null, "last"]
Where null represents any non-sorted items so that "one" and "three" come first and "last" comes last. Leftover properties get slotted into that null spot
This plugin should be a plugin in the stack after (at least)
ref
andconditional
plugins, as those two are responsible for generating a sometimes position-changing schema, produced from keywordsdefault
andif
/else
handling, with maybe changing render order, depending of the actual data / data-that was there / from-default.The plugin must order
properties
inside of schemas, ?nothing else?Rules for sorting by e.g.
sortOrder: ["propA", "propB"]
properties
exist, it should be the keys of theproperties
items
exist ANDitems
is anarray
it should be index keys of theitems
-schema (array-tuple
json-schema)sortOrder
will be ignoreditems
exists ANDitems
is itselfobject
, the order of theobject
must be used, not the one of thearray
properties.name
forsortOrder: ["name"]
) (typeof undefined
) thesortOrder
must be ignored / no empty schema added inproperties
Any not sorted part should be attached after the sorted parts in the same order it was before. A
null
placeholder can be used to specify where the non-sorted schema parts should be added, only the first foundnull
must "use" the non-sorted schema parts.The text was updated successfully, but these errors were encountered: