Skip to content

Commit ee0e4a4

Browse files
authored
Merge branch '5.x-dev' into PG-5206-ui-tests
2 parents 8916c90 + cf1e332 commit ee0e4a4

5 files changed

Lines changed: 50 additions & 4 deletions

File tree

Annotations/AnnotationGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ protected function getApplicableDemoExampleUrls(string $pluginName, string $meth
933933
];
934934

935935
// Don't build example URLs for anything that isn't the R in CRUD. E.g. No create, update, or delete.
936-
$notAllowedExampleUrlOperations = ['create', 'add', 'save', 'set', 'update', 'delete', 'remove', 'copy', 'duplicate'];
936+
$notAllowedExampleUrlOperations = ['create', 'add', 'save', 'set', 'update', 'delete', 'remove', 'copy', 'duplicate', 'generate'];
937937
foreach ($notAllowedExampleUrlOperations as $operation) {
938938
if (stripos($methodName, $operation) === 0) {
939939
return [];

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
## Changelog
2+
5.0.2 - 25/05/2026
3+
- Updated FAQ
4+
5+
5.0.1 - 25/05/2026
6+
- Added fix for endpoints that don't return valid API responses
7+
28
5.0.0
39
- Initial release of ApiReference plugin

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
## Description
44

5+
The API Reference plugin generates an OpenAPI (Swagger) specification from Matomo API definitions and supported plugin metadata.
6+
57
As APIs and plugins expose additional metadata, developers can browse available API endpoints, explore request parameters and response formats, and test API requests directly from the documentation interface.
68

79
### Features include:
810

911
* Interactive Swagger/OpenAPI-based API documentation
10-
* Searchable API methods and endpoints
1112
* Request and response schema documentation
1213
* Parameter descriptions and example requests
1314
* Improved navigation and API discoverability

docs/faq.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## FAQ
2+
3+
__Why is the OpenAPI specification file not generated?__
4+
5+
This can happen if the API Reference plugin is disabled, the Matomo cache has not been cleared, or the API specification generation process encountered an error.
6+
7+
Try the following:
8+
9+
* Ensure the API Reference plugin is installed and activated.
10+
* Clear the Matomo cache.
11+
* Check your server logs for PHP or permission errors.
12+
* Verify that the Matomo instance can write generated files to the configured directory.
13+
* Ensure all required plugins and dependencies are enabled.
14+
15+
The specification files are generated daily using a scheduled Matomo task. To check when this task is scheduled to run next, use the TasksTimetable plugin.
16+
17+
You can manually generate the specification files using the following command:
18+
19+
```bash
20+
core:run-scheduled-tasks "Piwik\Plugins\ApiReference\Tasks.generateConfiguredPluginSpecs"
21+
```
22+
23+
The initial generation process may take some time to complete, depending on the number of installed plugins.
24+
25+
__Can I still see the legacy API reference page?__
26+
27+
Yes. The legacy API reference remains available for compatibility and migration purposes while transitioning to the new API documentation.
28+
29+
__Why do some request or response schemas appear incomplete?__
30+
31+
The API Reference plugin generates request and response examples using data available in your Matomo instance. As a result, some response examples may appear incomplete if there is limited or no matching data available for a specific API request.
32+
33+
Not all API methods include response examples. Response examples are primarily generated for API methods that retrieve data from Matomo.
34+
35+
__Does the API Reference plugin replace existing Matomo APIs?__
36+
37+
No. The plugin modernises the API documentation experience while remaining compatible with existing Matomo APIs and integrations.
38+
39+
Existing API endpoints and integrations continue to function normally.

plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ApiReference",
3-
"description": "Generate and view API documentation for Matomo in the OpenAPI format.",
4-
"version": "5.0.0",
3+
"description": "Modern interactive API documentation for Matomo based on OpenAPI (Swagger). Explore endpoints, parameters, and responses directly in your browser. ",
4+
"version": "5.0.2",
55
"theme": false,
66
"keywords": [
77
"API",

0 commit comments

Comments
 (0)