Skip to content

Commit 5bcff25

Browse files
authored
Merge pull request #10 from matomo-org/PG-4502-improving-annotations
Further improve annotation generation
2 parents 70a541c + f3eae98 commit 5bcff25

43 files changed

Lines changed: 4541 additions & 69 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Annotations/AnnotationGenerator.php

Lines changed: 527 additions & 65 deletions
Large diffs are not rendered by default.

Annotations/GlobalApiComponents.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,15 @@
323323
* )
324324
*
325325
* Parameters specific to DataTables and Views
326+
* @OA\Parameter(parameter="expandedOptional", name="expanded", in="query",
327+
* description="If true, loads all subtables.", required=false,
328+
* @OA\Schema(type="integer", enum={0,1}, example=0, default=0))
329+
*
330+
* @OA\Parameter(parameter="idSubtableOptional", name="idSubtable", in="query",
331+
* description="An in-database subtable ID.", required=false,
332+
* @OA\Schema(type="integer"))
333+
*
334+
* Parameters specific to DataTables and Views
326335
* @OA\Parameter(parameter="flatOptional", name="flat", in="query",
327336
* description="Flatten subtables into the parent table.", required=false,
328337
* @OA\Schema(type="integer", enum={0,1}, example=0))
@@ -358,7 +367,7 @@
358367
* description="Row index after which rows are removed.", required=false, @OA\Schema(type="integer"))
359368
*
360369
* @OA\Parameter(parameter="filter_limitOptional", name="filter_limit", in="query",
361-
* description="Maximum rows to return.", required=false, @OA\Schema(type="integer"))
370+
* description="Maximum number of rows to return.", required=false, @OA\Schema(type="integer"))
362371
*
363372
* @OA\Parameter(parameter="filter_offsetOptional", name="filter_offset", in="query",
364373
* description="Row offset.", required=false, @OA\Schema(type="integer"))
@@ -384,8 +393,11 @@
384393
* @OA\Parameter(parameter="labelOptional", name="label", in="query",
385394
* description="Keep only rows with these label(s). Supports path via '>' and arrays.", required=false, @OA\Schema(type="string"))
386395
*
396+
* @OA\Parameter(parameter="idGoalRequired", name="idGoal", in="query",
397+
* description="The ID of a configured goal.", required=true, @OA\Schema(type="integer"))
398+
*
387399
* @OA\Parameter(parameter="idGoalOptional", name="idGoal", in="query",
388-
* description="Goal ID or special values (overview/minimal/full table).", required=false, @OA\Schema(type="string"))
400+
* description="The ID of a configured goal.", required=false, @OA\Schema(type="integer"))
389401
*/
390402
class GlobalApiComponents
391403
{
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"idalert": 1,
3+
"name": "Test Alert",
4+
"login": "someUserName",
5+
"period": "day",
6+
"report": "VisitsSummary_get",
7+
"report_condition": null,
8+
"report_matched": null,
9+
"report_mediums": [
10+
"email"
11+
],
12+
"metric": "nb_uniq_visitors",
13+
"metric_condition": "greater_than",
14+
"metric_matched": 500,
15+
"compared_to": 7,
16+
"email_me": 1,
17+
"additional_emails": [],
18+
"phone_numbers": [],
19+
"slack_channel_id": null,
20+
"id_sites": [
21+
1
22+
]
23+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<result>
3+
<idalert>1</idalert>
4+
<name>Test Alert</name>
5+
<login>someUserName</login>
6+
<period>day</period>
7+
<report>VisitsSummary_get</report>
8+
<report_condition />
9+
<report_matched />
10+
<report_mediums>
11+
<row>email</row>
12+
</report_mediums>
13+
<metric>nb_uniq_visitors</metric>
14+
<metric_condition>greater_than</metric_condition>
15+
<metric_matched>500</metric_matched>
16+
<compared_to>7</compared_to>
17+
<email_me>1</email_me>
18+
<additional_emails>
19+
</additional_emails>
20+
<phone_numbers>
21+
</phone_numbers>
22+
<slack_channel_id />
23+
<id_sites>
24+
<row>1</row>
25+
</id_sites>
26+
</result>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[
2+
{
3+
"idalert": 1,
4+
"name": "Test Alert",
5+
"login": "someUserName",
6+
"period": "day",
7+
"report": "VisitsSummary_get",
8+
"report_condition": null,
9+
"report_matched": null,
10+
"report_mediums": [
11+
"email"
12+
],
13+
"metric": "nb_uniq_visitors",
14+
"metric_condition": "greater_than",
15+
"metric_matched": 500,
16+
"compared_to": 7,
17+
"email_me": 1,
18+
"additional_emails": [],
19+
"phone_numbers": [],
20+
"slack_channel_id": null,
21+
"id_sites": [
22+
1
23+
]
24+
},
25+
{
26+
"idalert": 2,
27+
"name": "Test Visit Drop Previous Day",
28+
"login": "someUserName",
29+
"period": "day",
30+
"report": "VisitsSummary_get",
31+
"report_condition": null,
32+
"report_matched": null,
33+
"report_mediums": [
34+
"email"
35+
],
36+
"metric": "nb_uniq_visitors",
37+
"metric_condition": "percentage_decrease_more_than",
38+
"metric_matched": 20,
39+
"compared_to": 1,
40+
"email_me": 1,
41+
"additional_emails": [],
42+
"phone_numbers": [],
43+
"slack_channel_id": null,
44+
"id_sites": [
45+
1
46+
]
47+
}
48+
]
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<result>
3+
<row>
4+
<idalert>1</idalert>
5+
<name>Test Alert</name>
6+
<login>someUserName</login>
7+
<period>day</period>
8+
<report>VisitsSummary_get</report>
9+
<report_condition />
10+
<report_matched />
11+
<report_mediums>
12+
<row>email</row>
13+
</report_mediums>
14+
<metric>nb_uniq_visitors</metric>
15+
<metric_condition>greater_than</metric_condition>
16+
<metric_matched>500</metric_matched>
17+
<compared_to>7</compared_to>
18+
<email_me>1</email_me>
19+
<additional_emails>
20+
</additional_emails>
21+
<phone_numbers>
22+
</phone_numbers>
23+
<slack_channel_id />
24+
<id_sites>
25+
<row>1</row>
26+
</id_sites>
27+
</row>
28+
<row>
29+
<idalert>2</idalert>
30+
<name>Test Visit Drop Previous Day</name>
31+
<login>someUserName</login>
32+
<period>day</period>
33+
<report>VisitsSummary_get</report>
34+
<report_condition />
35+
<report_matched />
36+
<report_mediums>
37+
<row>email</row>
38+
</report_mediums>
39+
<metric>nb_uniq_visitors</metric>
40+
<metric_condition>percentage_decrease_more_than</metric_condition>
41+
<metric_matched>20</metric_matched>
42+
<compared_to>1</compared_to>
43+
<email_me>1</email_me>
44+
<additional_emails>
45+
</additional_emails>
46+
<phone_numbers>
47+
</phone_numbers>
48+
<slack_channel_id />
49+
<id_sites>
50+
<row>1</row>
51+
</id_sites>
52+
</row>
53+
</result>

0 commit comments

Comments
 (0)