--- id: SCH-31 family: GR-SCHEMA level: extended profiles: [storage-api, editor-client] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/gr-schema/sch-31 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # SCH-31 — Config field order applies inside a ui schema only *GR-SCHEMA (Part I) · level: extended · profiles: storage-api, editor-client · added in 1.0* ## 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`: ```json title="Two grouped properties, first weighted 20 and second weighted 10" verdict="declared" { "first": { "type": "string", "x-group": "general", "x-config-order": 20 }, "second": { "type": "string", "x-group": "general", "x-config-order": 10 } } ``` ```json title="What the generated layout orders them into" verdict="reordered" ["#/properties/second", "#/properties/first"] ``` ## Why Recorded under [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Names: SCH-23 - Referenced by: SCH-4, SCH-23 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.