How do I specifty the order of properties in json schema created by Liquid Studio?

1.4k Views Asked by At

We're currently using a Trial Version of Liquid Studio to check if it fits our requirements.

Our json looks similar to this:

{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "@id": "event-bulk",
  "title": "events - bulk send",
  "titleMap": {
    "de": "Ereignisse"
  },
  "description": "Send events in a bulk",
  "descriptionMap": {
    "de": "Sende Ereignisse als Block"
  },
  "additionalProperties": false,
  "type": "object",
  "properties": {
    ...
  },
  "definitions": {
    ...
  }
}

When we use Liquid Studio to edit our Json Schema it works fine so far but suddently I noticed that the resulting schema ends up looking like this:

{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object",
  "title": "events - bulk send",
  "description": "Send events in a bulk",
  "additionalProperties": {
    "not": {}
  },
  "properties": {
     ...
  },
  "required": [],
  "definitions": {
     ...
  },
  "@id": "event-bulk",
  "titleMap": {
    "de": "Ereignisse"
  },
  "descriptionMap": {
    "de": "Sende Ereignisse als Block"
  }
}

That means that not only the titleMap and descriptionMap for translations gets moved to the bottom of the file while we'd like to keep them close to the original title and description (we have many properties so it's very deep down), but also the ID that defines the type of the schema and should be noticeable quickly so it should be at the top.

Also it changes additionalProperties to an object which we don't really like aswell.

Is there any way to define a sort order and change the behaviour how mentioned things get changed and added?

Thank you.

1

There are 1 best solutions below

1
On

Sorry but there is no way to specify sequence, but the Graphical Schema Editor always shows the data in a consistent format.

The 'additionalProperties' seems to be an issue, so I will raise this with the dev team.