Skip to content

Commit 0809e00

Browse files
committed
fix(ui): few shot examples didn't display correctly from config
1 parent e3d9cf0 commit 0809e00

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ui/src/hooks/useSchemaDesigner.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ const convertJsonSchemaToClasses = (jsonSchema) => {
127127
properties: extractedProperties,
128128
required: schema.required || [],
129129
},
130+
// Preserve examples if they exist in the schema
131+
...(schema[X_AWS_IDP_EXAMPLES] ? { [X_AWS_IDP_EXAMPLES]: schema[X_AWS_IDP_EXAMPLES] } : {}),
130132
};
131133
allClasses.push(docTypeClass);
132134

@@ -188,6 +190,8 @@ const convertJsonSchemaToClasses = (jsonSchema) => {
188190
properties: extractedProperties,
189191
required: jsonSchema.required || [],
190192
},
193+
// Preserve examples if they exist in the schema
194+
...(jsonSchema[X_AWS_IDP_EXAMPLES] ? { [X_AWS_IDP_EXAMPLES]: jsonSchema[X_AWS_IDP_EXAMPLES] } : {}),
191195
};
192196
classes.push(mainClass);
193197

0 commit comments

Comments
 (0)