feat(Structured Output Parser Node): Add notice about $refs support in JSON schema (#15973)

This commit is contained in:
Eugene
2025-06-05 09:51:03 +02:00
committed by GitHub
parent c57e697249
commit 47ad74d137
3 changed files with 13 additions and 25 deletions

View File

@@ -120,18 +120,6 @@ export class OutputParserStructured implements INodeType {
},
},
},
{
displayName:
'The schema has to be defined in the <a target="_blank" href="https://json-schema.org/">JSON Schema</a> format. Look at <a target="_blank" href="https://json-schema.org/learn/miscellaneous-examples.html">this</a> page for examples.',
name: 'notice',
type: 'notice',
default: '',
displayOptions: {
hide: {
schemaType: ['fromJson'],
},
},
},
{
displayName: 'Auto-Fix Format',
description:
@@ -172,6 +160,17 @@ export class OutputParserStructured implements INodeType {
'Prompt template used for fixing the output. Uses placeholders: "{instructions}" for parsing rules, "{completion}" for the failed attempt, and "{error}" for the validation error message.',
},
],
hints: [
{
message:
'Fields that use $refs might have the wrong type, since this syntax is not currently supported',
type: 'warning',
location: 'outputPane',
whenToDisplay: 'afterExecution',
displayCondition:
'={{ $parameter["schemaType"] === "manual" && $parameter["inputSchema"]?.includes("$ref") }}',
},
],
};
async supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {