-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add documentation for Supervisor /os/config/swap API #2611
base: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThis pull request updates the API documentation by introducing two endpoints for managing HAOS swap configurations. The documentation outlines a Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant API as Supervisor API
C->>API: GET /os/config/swap
API-->>C: JSON { "swap_size": value, "swappiness": value }
C->>API: POST /os/config/swap {"swap_size": "40M", "swappiness": 50}
API-->>C: Confirmation Response
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. 🪧 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 (
|
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
🧹 Nitpick comments (2)
docs/api/supervisor/endpoints.md (2)
2585-2599
: Clarify GET /os/config/swap endpoint documentationThe GET endpoint is clearly documented with a concise description, a table of returned data, and an example response. One suggestion for improvement is to expand on “Unavailable on Supervised” (e.g., “This API endpoint is only available on Home Assistant OS installations not running in Supervised mode.”) for clarity.
2600-2607
: Fix Typographical Error and Improve Table Formatting in POST /os/config/swap endpointThere is a typo in the payload table: “New swap siz as number…” should be corrected to “New swap size specified as a number…”. In addition, to comply with markdownlint (MD058) and improve readability, please add blank lines before and after the table.
A suggested diff is provided below:
-**Payload:** -| key | type | description | -|------------|--------|--------------------------------------------------------------------------------------------| -| swap_size | string | New swap siz as number with optional units (K/M/G). Anything lower than 40K disables swap. | -| swappiness | int | New swappiness value (0-100). | +**Payload:** +| key | type | description | +|------------|--------|--------------------------------------------------------------------------------------------| +| swap_size | string | New swap size specified as a number with optional units (K/M/G). Anything lower than 40K disables swap. | +| swappiness | int | New swappiness value (0-100). |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/api/supervisor/endpoints.md
(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/api/supervisor/endpoints.md
2616-2616: Tables should be surrounded by blank lines
null
(MD058, blanks-around-tables)
Proposed change
SSIA
Type of change
Additional information
Summary by CodeRabbit
New Features
Documentation