• Overrides an existing wiki schema in the swarm system with a new or partial schema. This function updates the configuration of a wiki identified by its wikiName, applying the provided schema properties. It operates outside any existing method or execution contexts to ensure isolation, leveraging beginContext for a clean execution scope. Logs the override operation if logging is enabled in the global configuration.

    Parameters

    • OptionalwikiSchema: TWikiSchema

      The schema containing the wiki’s unique name and optional properties to override.

      • wikiName

        The unique identifier of the wiki to override, matching IWikiSchema["wikiName"].

    Returns IWikiSchema

    No return value; the override is applied directly to the swarm’s wiki schema service.

    If the wiki schema service encounters an error during the override operation (e.g., invalid wikiName or schema).

    // Override a wiki’s schema with new properties
    overrideWiki({
    wikiName: "KnowledgeBase",
    description: "Updated knowledge repository",
    storage: "WikiStorage",
    });
    // Logs the operation (if enabled) and updates the wiki schema in the swarm.