docs: audit and correct API documentation#47
Conversation
This commit corrects several inconsistencies in the API documentation under `docs/api/`. The following changes were made: - Removed sections from `v1alpha1-sentinel.md` and `v1alpha1-user.md` that were documenting structs not present in their respective APIs. - Corrected several fields in `core-types.md` to match the Go type definitions, including fields in `Storage`, `InstanceAccess`, and `ValkeyNode`. This ensures that the API documentation is accurate and consistent with the underlying code.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll acknowledge your comments with a 👀 emoji and then get to work. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! I will automatically address your feedback on specific files or sections of files. For any comments you don't want me to act on, just include PS: Responding to comments on the entire PR are not yet supported but coming soon. For security, I will only act on instructions from the user who triggered this task for this pull request. |
There was a problem hiding this comment.
Pull Request Overview
This PR audits and corrects the API documentation to ensure it aligns with the actual API definitions. The changes address user feedback about documentation being out of sync by removing sections for non-existent fields and correcting field types and names.
- Removed outdated Authorization and SentinelMonitorNode sections that don't exist in the API
- Updated core types documentation with correct field names, types, and added missing fields
- Corrected field types from concrete to pointer types and updated enum references
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/api/v1alpha1-user.md | Removed non-existent Authorization section |
| docs/api/v1alpha1-sentinel.md | Removed non-existent SentinelMonitorNode section |
| docs/api/core-types.md | Updated field types, names, and added missing fields in multiple sections |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| | `loadBalancerSourceRanges` | []string | Source IP ranges for LoadBalancer | | ||
| | `annotations` | map[string]string | Service annotations | | ||
| | `nodePortSequence` | string | NodePort sequence assignment | | ||
| | `ipFamilyPrefer` | corev1.IPFamily | IP family preference (IPv4, IPv6) | |
There was a problem hiding this comment.
The description mentions only IPv4 and IPv6, but the original documentation mentioned dual-stack support. If dual-stack is supported, the description should include it, or if it's no longer supported, this change is correct.
| | `ipFamilyPrefer` | corev1.IPFamily | IP family preference (IPv4, IPv6) | | |
| | `ipFamilyPrefer` | corev1.IPFamily | IP family preference (IPv4, IPv6, DualStack) | |
| | `role` | NodeRole | Node role (master, replica, sentinel) | | ||
| | `ip` | string | Node IP address | | ||
| | `port` | int32 | Node port | | ||
| | `role` | NodeRole | Node role (master, slave, sentinel) | | ||
| | `port` | string | Node port | |
There was a problem hiding this comment.
The role description mentions 'master' while the original used 'slave' for replicas. Ensure this terminology change is consistent with the actual API enum values. Also, the port field changed from int32 to string - verify this type change is accurate.
| | `ip` | string | Node IP address | | ||
| | `port` | int32 | Node port | | ||
| | `role` | NodeRole | Node role (master, slave, sentinel) | | ||
| | `port` | string | Node port | |
There was a problem hiding this comment.
The role description mentions 'master' while the original used 'slave' for replicas. Ensure this terminology change is consistent with the actual API enum values. Also, the port field changed from int32 to string - verify this type change is accurate.
| | `port` | string | Node port | | |
| | `port` | int32 | Node port | |
Audited and corrected the API documentation in
docs/api/. This addresses user feedback about the documentation being out of sync with the API definitions. The changes include removing sections for non-existent fields and correcting the types and names of several fields in the core types documentation.