docs: Add Themes API endpoint documentation (#471)#482
docs: Add Themes API endpoint documentation (#471)#482khawarlatifkhan wants to merge 17 commits into
Conversation
Migrate Themes REST API documentation from legacy markdown to RST format. Content verified against Mautic 7.0 source code (ThemeApiController.php and ThemeHelper.php). Documents all endpoints: get, list, create, delete. Adds detailed response properties including theme config fields.
Co-authored-by: promptless[bot] <promptless[bot]@users.noreply.github.com>
614b540 to
749cc08
Compare
| @@ -1,14 +1,284 @@ | |||
| Themes | |||
There was a problem hiding this comment.
Ported endpoint documentation structure, PHP code examples, and JSON response examples from the legacy _api_endpoint_themes.md file.
Source: https://github.com/mautic/developer-documentation/blob/main/source/includes/_api_endpoint_themes.md
| } | ||
|
|
||
| **Response Properties** | ||
|
|
There was a problem hiding this comment.
Verified API endpoints and behavior against ThemeApiController.php in Mautic 7.0 source. Confirmed newAction, getAction, listAction, and deleteAction methods match documented endpoints.
|
|
||
| * - Name | ||
| - Type | ||
| - Description |
There was a problem hiding this comment.
Added response properties (name, key, config, builder) and documented default theme deletion behavior based on ThemeHelper.php. The getInstalledThemes() method returns theme details with config; default themes are hidden rather than deleted.
Source: https://github.com/mautic/mautic/blob/7.x/app/bundles/CoreBundle/Helper/ThemeHelper.php
|
@mautic/core-team can you please review the content here? TIA! ✨ |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
Address PR review suggestions from @adiati98: - Improve intro paragraph and section headers for consistency - Use "HTTP request" and "Response" as proper RST section headers - Add "Returns 200 OK" pattern to all Response sections - Change property headers to proper RST formatting - Improve wording for theme descriptions and error responses - Add vale off/on around "Config object properties" header - Use bullet list format for error conditions - Update note about default Theme deletion prevention
|
I've addressed all the review suggestions from @adiati98. Changes applied:
Ready for re-review. |
adiati98
left a comment
There was a problem hiding this comment.
Let's address the Vale warnings.
@promptless-for-oss please address the suggestions
- Add vale off/on directives around all 4 HTTP request section headers - Shorten 'application' to 'app' in delete default Themes note
|
Thanks @adiati98 for the review feedback! I've addressed all your suggestions:
The changes have been pushed to this PR branch. |
Migrates the Themes REST API documentation from legacy markdown to RST format. Content verified against Mautic 7.0 source code. Documents all endpoints (get, list, create, delete) with detailed response properties.
Closes #471