diff --git a/lib/getScopesOfParsedJsonSchema.ts b/lib/getScopesOfParsedJsonSchema.ts index 185272df8..9bc6d60c6 100644 --- a/lib/getScopesOfParsedJsonSchema.ts +++ b/lib/getScopesOfParsedJsonSchema.ts @@ -6,7 +6,15 @@ export type JsonSchemaPathWithScope = { jsonPath: string; scope: JsonSchemaScope; }; - +/** + * Recursively parses a JSON Schema to map JSON paths to their corresponding scope types. + * This is primarily used to bind interactive UI elements to specific schema definitions + * in the schema editor. + * + * @param parsedJsonSchema - The parsed JSON Schema object or sub-schema. + * @param jsonPath - The current JSON path prefix (defaults to the root '$'). + * @returns An array of objects mapping the calculated JSON paths to their scopes. + */ export default function getScopesOfParsedJsonSchema( parsedJsonSchema: any, jsonPath = '$',