Issue/522 demoapi openapi coverage#523
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR fixes incomplete and inconsistent OpenAPI templates in the DemoApi module. It corrects the spec file path construction, updates four controller OpenAPI templates (auth, post) with accurate path parameters and schemas, and introduces two new controller templates (account, comment) for previously undocumented endpoints. ChangesOpenAPI Template and Spec Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b968a7fc34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Console/Commands/OpenApiCommand.php`:
- Line 201: In OpenApiCommand.php update the case of the OpenAPI directory check
so it matches the created/reference directory name: replace the string 'openApi'
with 'openapi' in the existence check (the code around the method in the
OpenApiCommand class that performs the directory existence validation), ensuring
consistency with other usages like the $fs->getJson call and the spec
installation logic that reference "openapi".
In
`@src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiPostController.php.tpl`:
- Around line 69-108: The method parameter names in the OpenApi controller
template are inconsistent with the OpenAPI docs and routes: rename the parameter
$postId to $uuid in the abstract method signatures for post(), amend(),
delete(), and deleteImage() so the parameter name matches the `@OA`\Parameter
("uuid") and route definitions; update the signatures (e.g., abstract public
function post(?string $lang, string $postId) -> abstract public function
post(?string $lang, string $uuid)) for all four methods (post, amend, delete,
deleteImage) to keep names consistent across docs, routes and code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1f09615b-d881-49ea-b967-6cbe8547478a
📒 Files selected for processing (5)
src/Console/Commands/OpenApiCommand.phpsrc/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAccountController.php.tplsrc/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAuthController.php.tplsrc/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiCommentController.php.tplsrc/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiPostController.php.tpl
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #523 +/- ##
=========================================
Coverage 90.87% 90.87%
Complexity 3070 3070
=========================================
Files 263 263
Lines 8100 8100
=========================================
Hits 7361 7361
Misses 739 739 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #522
Summary by CodeRabbit
Release Notes
Documentation
New Features