diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e01d1..708cb4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ ## Changelog +5.0.4 - 2026-06-29 +- Removed eager fetching of Matomo URL + 5.0.3 - 08/06/2026 - Improved wording of authorization buttons and help text - Cleaned up styling on input fields diff --git a/Specs/SpecGenerator.php b/Specs/SpecGenerator.php index 4a97649..253668f 100644 --- a/Specs/SpecGenerator.php +++ b/Specs/SpecGenerator.php @@ -38,11 +38,6 @@ public function __construct(?PathResolver $specPathResolver = null, ?ArtifactWri { $this->specPathResolver = $specPathResolver ?? new PathResolver(); $this->artifactWriter = $artifactWriter ?? new ArtifactWriter(); - - // Set the constant for the current instance's URL - if (!defined('LOCAL_MATOMO_SERVER_URL')) { - define('LOCAL_MATOMO_SERVER_URL', SettingsPiwik::getPiwikUrl()); - } } /** @@ -77,6 +72,11 @@ public function generatePluginDoc(string $pluginName, string $format = 'json', s */ public function generateSpec(array $pluginNames, string $format = 'json', string $version = ApiReference::DEFAULT_SPEC_VERSION, bool $writeToFile = false): string { + // Set the constant for the current instance's URL + if (!defined('LOCAL_MATOMO_SERVER_URL')) { + define('LOCAL_MATOMO_SERVER_URL', SettingsPiwik::getPiwikUrl()); + } + BaseValidator::check('pluginNames', $pluginNames, [new NotEmpty()]); $currentPluginDir = Manager::getInstance()::getPluginDirectory('ApiReference'); diff --git a/plugin.json b/plugin.json index c0ebbd0..0030d09 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "ApiReference", "description": "Modern interactive API documentation for Matomo based on OpenAPI (Swagger). Explore endpoints, parameters, and responses directly in your browser. ", - "version": "5.0.3", + "version": "5.0.4", "theme": false, "keywords": [ "API",