-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathconfiguration.php
More file actions
109 lines (95 loc) · 6.59 KB
/
Copy pathconfiguration.php
File metadata and controls
109 lines (95 loc) · 6.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/*
* configuration.php
* Copyright (c) 2025 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
$dotenv = Dotenv\Dotenv::createUnsafeImmutable(__DIR__);
$dotenv->safeLoad();
$destination = realpath(getenv('API_DESTINATION'));
$server = getenv('API_SERVER');
$isDevRun = 'true' === getenv('DEV_RUN');
define('ROOT', getenv('API_SOURCE_ROOT'));
$tags = [
// system
'about' => ['description' => 'These endpoints deliver general system information, version- and meta information.',],
'configuration' => ['description' => 'These endpoints allow you to manage and update the Firefly III configuration. You need to have the "owner" role to update configuration.',],
'users' => ['description' => 'Use these endpoints to manage the users registered within Firefly III. You need to have the "owner" role to access these endpoints.',],
'autocomplete' => ['description' => 'Auto-complete endpoints show basic information about Firefly III models, like the name and maybe some amounts. They all support a search query and can be used to autocomplete data in forms. Autocomplete return values always have a "name"-field.',],
'charts' => ['description' => 'The "charts" endpoints deliver optimised data for charts and graphs.',],
'data' => ['description' => 'The "data"-endpoints manage generic Firefly III and user-specific data.',],
'insight' => ['description' => 'The "insight" endpoints try to deliver sums, balances and insightful information in the broadest sense of the word.',],
'summary' => ['description' => 'These endpoints deliver summaries, like sums, lists of numbers and other processed information. Mainly used for the main dashboard and pretty specific for Firefly III itself.',],
'search' => ['description' => 'Endpoints that allow you to search through the user\'s financial data. Different from the autocomplete endpoints, the search accepts more advanced arguments.',],
'preferences' => ['description' => 'These endpoints can be used to manage the user\'s preferences, including some hidden ones.',],
'webhooks' => ['description' => 'These endpoints can be used to manage the user\'s webhooks and triggers them if necessary.',],
'accounts' => ['description' => 'Endpoints that deliver all of the user\'s asset, expense and other accounts (and the metadata) together with related transactions, piggy banks and other objects. Also delivers endpoints for CRUD operations for accounts.',],
'attachments' => ['description' => 'Endpoints to manage the attachments of the authenticated user, including up- and downloading of the files.',],
'available_budgets' => ['description' => 'Endpoints to manage the total available amount that the user has made available to themselves. Used in periodic budgeting.',],
'bills' => ['description' => 'Endpoints to manage a user\'s bills and all related objects.',],
'budgets' => ['description' => 'Endpoints to manage a user\'s budgets and get info on the related objects, like limits.',],
'categories' => ['description' => 'Endpoints to manage a user\'s categories and get information on transactions and other related objects.',],
'object_groups' => ['description' => 'Endpoints to control and manage all of the user\'s object groups. Can only be created in conjunction with another object (for example a piggy bank) and will auto-delete when no other items are linked to it.',],
'piggy_banks' => ['description' => 'Endpoints to control and manage all of the user\'s piggy banks and related objects and information.',],
'recurrences' => ['description' => 'Use these endpoints to manage the user\'s recurring transactions, trigger the creation of transactions and manage the settings.',],
'rules' => ['description' => 'These endpoints can be used to manage all of the user\'s rules. Also includes triggers to execute or test rules and individual triggers.',],
'rule_groups' => ['description' => 'Manage all of the user\'s groups of rules and trigger the execution of entire groups.',],
'tags' => ['description' => 'This endpoint manages all of the user\'s tags.',],
'transactions' => ['description' => 'The most-used endpoints in Firefly III, these endpoints are used to manage the user\'s transactions.',],
'currencies' => ['description' => 'Endpoints to manage the currencies in Firefly III. Depending on the user\'s role you can also disable and enable them, or add new ones.',],
'links' => ['description' => 'Endpoints to manage links between transactions, and manage the type of links available.',],
'user_groups' => ['description' => 'User groups are the objects around which "financial administrations" are built.',],
'currency_exchange_rates' => ['description' => 'All currency exchange rates.',],
];
ksort($tags);
// scan directories and add all paths:
$directories = [
[
'path' => 'v1/paths',
'identifier' => 'paths',
'indentation' => 1,
],
[
'path' => 'v1/schemas',
'identifier' => 'schemas',
'indentation' => 2,
],
/**
* SHARED OBJECTS.
*/
[
'path' => 'shared/filters',
'identifier' => 'schemas',
'indentation' => 2,
],
[
'path' => 'shared/models',
'identifier' => 'schemas',
'indentation' => 2,
],
[
'path' => 'shared/properties',
'identifier' => 'schemas',
'indentation' => 2,
],
[
'path' => 'shared/responses',
'identifier' => 'schemas',
'indentation' => 2,
],
];