Added ability to add documentation for inactive plugins, PG-4593#23
Conversation
AltamashShaikh
left a comment
There was a problem hiding this comment.
@lachiebol Will it now consider cloud only plugins also ?
What if we want to ignore those plugins like ConnectAccounts ?
AltamashShaikh
left a comment
There was a problem hiding this comment.
Btw, this works as expected, but left 1 Q
Only if we specify in Right now no cloud plugins are included. This command could technically run on those plugins. But the list we use to generate the single file doesn't include cloud plugins. |
|
@lachiebol Can this command not run any cloud plugins ? I am just concerned of Billing plugin so better to block it. |
Should I do a blocklist? Currently they're not included in the generation command, but someone could technically query the other endpoint and retrieve it |
Yes that would be good. |
| { | ||
| BaseValidator::check('plugin', $pluginName, [new NotEmpty()]); | ||
|
|
||
| if (in_array($pluginName, ['Billing', 'Cloud', 'ConnectAccounts'], true)) { |
There was a problem hiding this comment.
Need to add CDN and ProxySite too
| BaseValidator::check('plugin', $pluginName, [new NotEmpty()]); | ||
|
|
||
| foreach (explode(',', $pluginName) as $currentPluginName) { | ||
| if (in_array($currentPluginName, ['Billing', 'Cloud', 'ConnectAccounts'], true)) { |
There was a problem hiding this comment.
Make a constant of this array and use that in both the place
* Pulled out spec generation logic into common service, added new Task for spec generation * Fixed plugin name logic and tests * Fixed broken description logic from PR #23, added back in early return * Add docs to public method * Changed to daily and removed 'all' option * fix tests * Move blocklist validation down to generateSpec level * removed config file, not needed * restored config.php to normal state * fix phpcs
Description
Remove bypass for deactivated plugins -> instead we now check if its in the filesystem. Will be needed if we want to host on demo.matomo.cloud
Something like this should work now:
ddev matomo:console plugin:deactivate CrashAnalyticsddev matomo:console openapidocs:generate-spec-file --plugin=CrashAnalytics --format=json --add-annotations --not-dry-runThis should error:
ddev matomo:console openapidocs:generate-spec-file --plugin=NotRealPlugin --format=json --add-annotations --not-dry-runIssue No
Steps to Replicate the Issue
Checklist