Skip to content

Config field order applies inside a ui schema only

The rule

Normative: this is the rule
  1. x-config-order MUST order config fields ascending.
  2. A property whose value is absent or not numeric MUST count as 0.
  3. x-config-order MUST take effect inside a generated ui schema only: where no property carries a registered group there is no ui schema, no layout, and x-config-order has no effect on the flat form.

What it means

The weight is the whole of the ordering this rule asks for. A field without one weighs 0, so it sits with every other unweighted field, before any field weighted above 0 and after any weighted below it. How fields of equal weight are laid out among themselves is left to the implementation: an author who needs a fixed order gives each field its own weight.

Example

Two grouped properties, first weighted ahead of second:

Two grouped properties, first weighted 20 and second weighted 10declared
{
  "first": { "type": "string", "x-group": "general", "x-config-order": 20 },
  "second": { "type": "string", "x-group": "general", "x-config-order": 10 }
}
What the generated layout orders them intoreordered
["#/properties/second", "#/properties/first"]

Why

Recorded under OPEN-25.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · SCH-31 · changed in spec 1.0