fix: documentation for setOverride is pointing to the limit endpoint#2726
fix: documentation for setOverride is pointing to the limit endpoint#2726
Conversation
The setOverride was incorrectly pointing to the limit endpoint
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThe pull request modifies the API documentation for the rate limits endpoint. The endpoint has been changed from Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
apps/docs/api-reference/ratelimits/set-override.mdx (2)
Line range hint
7-9: Consider adding a code example for clarity.While the update behavior is clearly explained, adding a code example showing how to create and then update an override would make it even more user-friendly.
Here's a suggested addition:
There is no `update` endpoint. Instead you should call this endpoint again to overwrite your override. + +### Example + +```typescript +// Create initial override +await unkey.ratelimits.setOverride({ + identifier: "user_123", + limit: 100 +}); + +// Later, update the same override +await unkey.ratelimits.setOverride({ + identifier: "user_123", + limit: 200 // This overwrites the previous limit +}); +```
Line range hint
11-16: Consider expanding the changelog entry with more details.While the current changelog entry is clear, it would be more helpful to briefly describe the endpoint's purpose and any key behaviors.
Here's a suggested enhancement:
| Date | Changes | |-------------|---------------------| -| Nov 25 2024 | Introduced endpoint | +| Nov 25 2024 | Introduced endpoint for setting and updating rate limit overrides for specific identifiers |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
apps/docs/api-reference/ratelimits/set-override.mdx(1 hunks)
🔇 Additional comments (1)
apps/docs/api-reference/ratelimits/set-override.mdx (1)
3-3: LGTM! The endpoint name accurately reflects its purpose.
The endpoint name setOverride is more descriptive and better aligned with its functionality than the previous limit endpoint.
What does this PR do?
The setOverride was incorrectly pointing to the limit endpoint
Fixes # (issue)
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists
Type of change
How should this be tested?
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit
New Features
post /v1/ratelimits.setOverride.Documentation