0

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.

Relequestual
  • 11,631
  • 6
  • 47
  • 83
Wolfspirit
  • 728
  • 7
  • 9
  • It seems the editor does not support draft 6 of JSON schema. – Clemens Nov 08 '18 at 09:47
  • Thank you for the answer but that's not the case. According to https://www.liquid-technologies.com/json-schema-editor it supports draft 4 and 6 – Wolfspirit Nov 08 '18 at 12:11
  • Could be that the editor supports draft 6 only partly. If it would support draft 6 completely it wouldn't convert a "false" schema to "not": {}. – Clemens Nov 09 '18 at 12:32

1 Answers1

0

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.

  • Thank you for the answer. Sadly it's a requirement for us as the schema is part of the documentation for other developers. Are there any plans to support something like that in the future? Especially the @id should be at the top in my opinion. – Wolfspirit Nov 08 '18 at 12:09