From 01e6bc4063a55c84c14ed3074a039c763229a773 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 22:15:56 +0000 Subject: [PATCH] docs: add async example to patch.schemas JSDoc Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com> --- packages/shared/src/config/parser/patch.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/shared/src/config/parser/patch.ts b/packages/shared/src/config/parser/patch.ts index 9ae6e58a4..941405889 100644 --- a/packages/shared/src/config/parser/patch.ts +++ b/packages/shared/src/config/parser/patch.ts @@ -129,6 +129,9 @@ export type Patch = * - `Record`: Patch specific named schemas * - `function`: Bulk callback receives `(name, schema)` for every schema * + * Both patterns support async functions for operations like fetching data + * from external sources or performing I/O. + * * @example * ```js * // Named schemas @@ -160,6 +163,14 @@ export type Patch = * `\n@version ${match[1]}.${match[2]}.${match[3]}`; * } * } + * + * // Async example - fetch metadata from external source + * schemas: async (name, schema) => { + * const metadata = await fetchSchemaMetadata(name); + * if (metadata) { + * schema.description = `${schema.description}\n\n${metadata.notes}`; + * } + * } * ``` */ schemas?: -- 2.51.2