@diagonal-hq/cli 0.45.1 → 0.45.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -746,7 +746,7 @@ var field_catalog_default = {
746
746
  dictionary: {
747
747
  settings: {
748
748
  schema: {
749
- required: true,
749
+ required: false,
750
750
  values: null,
751
751
  relation_types: null
752
752
  },
@@ -2490,7 +2490,10 @@ function buildField(key, builder, keyNode, { checkKey = true } = {}) {
2490
2490
  );
2491
2491
  }
2492
2492
  let settings = buildSettings(key, builder, entry, typeCatalog);
2493
- if (type === "list" && (settings.schema === null || Array.isArray(settings.schema) && settings.schema.length === 0)) {
2493
+ const schema = settings.schema;
2494
+ const emptySchema = schema === null || Array.isArray(schema) && schema.length === 0;
2495
+ const emptyDictionarySchema = type === "dictionary" && isPlainObject(schema) && Object.keys(schema).length === 0;
2496
+ if ((type === "list" || type === "dictionary") && emptySchema || emptyDictionarySchema) {
2494
2497
  delete settings.schema;
2495
2498
  }
2496
2499
  if (type === "relation") {