-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Fixes a few typos in the docs from revoke to modify / retrieve #2212
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThe pull request includes updates to the documentation for three functions: Changes
Assessment against linked issues
Possibly related PRs
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 (
|
@harshsbhat is attempting to deploy a commit to the Unkey Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (4)
apps/docs/libraries/ex/functions/update_key.mdx (3)
18-18
: Approved change with a minor suggestionThe update from "revoke" to "modify" accurately reflects the function's purpose and aligns with the PR objectives. This change improves the documentation's clarity.
For consistency with the function's title and description, consider changing "modify" to "update":
- The ID of the key you want to modify. + The ID of the key you want to update.This minor adjustment would maintain consistency throughout the documentation.
Line range hint
7-7
: Inconsistency in parameter namingThere's an inconsistency between the method signature and the request section regarding the key identifier parameter:
The method signature uses
key_id
:@spec update_key(binary(), map()) :: :okThe request section uses
keyId
:<ParamField path="keyId" type="string" required>For consistency and to avoid confusion, consider using the same naming convention throughout the documentation. Given that the request section uses camelCase, updating the method signature might be appropriate:
- @spec update_key(binary(), map()) :: :ok + @spec update_key(binary(), map()) :: :ok# Example usage in the code snippet UnkeyElixirSdk.update_key("key_cm9vdCBvZiBnb29kXa", %{ # ... other parameters ... })This change would ensure consistency across the documentation and code examples.
Also applies to: 18-18
Line range hint
61-65
: Incorrect description for theremaining
parameterThe description for the
remaining
parameter appears to be incorrect. It's currently identical to the description for theexpires
parameter:<ParamField body="remaining" type="int | nil"> Update the expire time of a key. The expire time is a unix timestamp in milliseconds. </ParamField>This seems to be a copy-paste error. The
remaining
parameter likely refers to the number of uses remaining for the key, not its expiration time. Consider updating the description to accurately reflect the purpose of theremaining
parameter:<ParamField body="remaining" type="int | nil"> - Update the expire time of a key. - -The expire time is a unix timestamp in milliseconds. + Update the number of remaining uses for the key. + + Set to `nil` to remove the limit on remaining uses. </ParamField>Please verify the correct meaning of the
remaining
parameter and update the description accordingly.apps/docs/libraries/ts/sdk/keys/get.mdx (1)
Line range hint
1-138
: Consider adding testing information to the documentationThe documentation for the "Get" operation is now accurate and consistent. To further improve its completeness, consider adding information on how to test this functionality. This aligns with the PR checklist item "How to test" which is currently unfilled.
Would you like assistance in drafting a "How to test" section for this documentation?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- apps/docs/libraries/ex/functions/update_key.mdx (1 hunks)
- apps/docs/libraries/ex/functions/update_remaining.mdx (1 hunks)
- apps/docs/libraries/ts/sdk/keys/get.mdx (1 hunks)
🔇 Additional comments (4)
apps/docs/libraries/ex/functions/update_remaining.mdx (3)
Line range hint
6-6
: LGTM: Good addition of function specification.The added specification
@spec update_remaining(map()) :: :ok
provides clear information about the function's input and output types. This is a good practice in Elixir documentation and enhances the clarity of the API.
13-13
: Excellent correction of thekeyId
description.The change from "revoke" to "modify" in the
keyId
description accurately reflects the purpose of theupdate_remaining
function. This correction aligns well with the PR objectives and addresses the documentation issue mentioned in #2211.
Line range hint
1-58
: Summary: Documentation updates successfully address the reported issues.The changes made to this file effectively address the issues mentioned in the PR objectives and the linked issue #2211:
- The function specification has been added, enhancing the clarity of the API documentation.
- The
keyId
parameter description has been corrected from "revoke" to "modify", accurately reflecting the function's purpose.These updates improve the accuracy and consistency of the documentation for the
update_remaining
function. No further changes appear necessary in this file.apps/docs/libraries/ts/sdk/keys/get.mdx (1)
9-9
: Excellent update to thekeyId
description!This change accurately reflects the purpose of the "Get" operation, which is to retrieve key information rather than to revoke a key. It directly addresses the issue mentioned in #2211 and aligns perfectly with the PR objectives of fixing incorrect descriptions in the documentation.
Awarding harshsbhat: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/harshsbhat |
What does this PR do?
Fixes a few typos in the docs
Fixes #2211
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 build
pnpm fmt
console.logs
git pull origin main
Appreciated
Summary by CodeRabbit
update_key
function documentation to clarify its purpose and parameter changes.update_remaining
function documentation to reflect modifications in parameter descriptions.Get
API key functionality documentation to specify the correct use of thekeyId
parameter for retrieval instead of revocation.