Skip to content

Properties order #571

@mfulton26

Description

@mfulton26

UI generation tools would benefit, I think, from having a way to specify the order of properties.

For simple cases, perhaps properties could be optionally defined as an array of objects where at a minimum each object has a name property:

"properties": [
  {
    "name": "foo",
    "type": "string"
  },
  {
    "name": "bar",
    "type": "boolean"
  }
]

Alternatively a new keyword could be introduced, propertiesOrder:

"properties": {
    "bar": { "type": "boolean" },
    "foo": { "type": "string" }
},
"propertiesOrder": ["foo", "bar"]

This keyword could also support patterns:

"properties": {
    "bar": { "type": "boolean" },
    "foo": { "type": "string" },
    "num": { "type": "number" }
},
"propertiesOrder": [".*", "foo", "bar"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions