{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/wget/main/json-schema/wget2-plugin-schema.json", "title": "Wget2 Plugin", "description": "Schema representing the Wget2 plugin API structure, including plugin registration, URL filter callbacks, and post-download processor callbacks via libwget.", "type": "object", "properties": { "pluginName": { "type": "string", "description": "The registered name of the Wget2 plugin as returned by wget_plugin_get_name()." }, "initializerFunction": { "type": "string", "description": "Name of the required entry point: wget_plugin_initializer(). Called when the plugin is loaded.", "const": "wget_plugin_initializer" }, "callbacks": { "type": "object", "description": "Callbacks registered by the plugin.", "properties": { "finalizer": { "type": "object", "description": "Callback invoked when wget exits.", "properties": { "function": { "type": "string", "description": "Function name registered via wget_plugin_register_finalizer()." }, "receivesExitStatus": { "type": "boolean", "description": "The finalizer receives the exit status of wget." } } }, "optionHandler": { "type": "object", "description": "Callback for handling plugin-specific command-line options.", "properties": { "function": { "type": "string", "description": "Function name registered via wget_plugin_register_option_callback()." }, "optionPattern": { "type": "string", "description": "CLI option pattern: --plugin-opt=.