@flowgram.ai/form-materials 0.2.17 → 0.2.19

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.
@@ -42,7 +42,10 @@ export namespace JsonSchemaUtils {
42
42
  .map(([key, _property]) => ({
43
43
  key,
44
44
  type: schemaToAST(_property),
45
- meta: { description: _property.description },
45
+ meta: {
46
+ title: _property.title,
47
+ description: _property.description,
48
+ },
46
49
  })),
47
50
  });
48
51
  case 'array':
@@ -114,7 +117,18 @@ export namespace JsonSchemaUtils {
114
117
  type: 'object',
115
118
  properties: drilldown
116
119
  ? Object.fromEntries(
117
- typeAST.properties.map((property) => [property.key, astToSchema(property.type)!])
120
+ typeAST.properties.map((property) => {
121
+ const schema = astToSchema(property.type);
122
+
123
+ if (property.meta?.title && schema) {
124
+ schema.title = property.meta.title;
125
+ }
126
+ if (property.meta?.description && schema) {
127
+ schema.description = property.meta.description;
128
+ }
129
+
130
+ return [property.key, schema!];
131
+ })
118
132
  )
119
133
  : {},
120
134
  };