docs: Add missing JSDoc comments to API endpoints - #6347
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Psykii22 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR aims to improve developer experience in the frontend Kubernetes API v1 layer by replacing @todo placeholders with JSDoc so IDE tooltips better describe API types and function behavior.
Changes:
- Added JSDoc for
StreamResultsParamsandstreamResultsForClusterinstreamingApi.ts. - Added JSDoc for the
DrainNodeStatusinterface and clarified thedrainNodeStatusreturn description indrainNode.ts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/src/lib/k8s/api/v1/streamingApi.ts | Adds documentation for streaming configuration and behavior, but still leaves one // @todo: needs documenting. and has an existing JSDoc return mismatch for streamResults. |
| frontend/src/lib/k8s/api/v1/drainNode.ts | Documents drain status type and return value, but the new doc for DrainNodeStatus.id is inaccurate relative to backend behavior. |
Signed-off-by: Psykii22 <189542486+Psykii22@users.noreply.github.com>
Summary
This PR adds missing JSDoc comments to the frontend API layer, replacing old
@todoplaceholders with proper documentation to improve developer experience.Related Issue
Changes
drainNode.ts: Added JSDoc blocks for theDrainNodeStatusinterface and documented the return promise for thedrainNodeStatusfunction.streamingApi.ts: Added JSDoc blocks clarifying the internal configuration structure ofStreamResultsParamsand the behavior of thestreamResultsForClusterstreaming function.// @todo: needs documentingcomments scattered throughout the API files.Steps to Test
frontend/src/lib/k8s/api/v1/drainNode.tsandfrontend/src/lib/k8s/api/v1/streamingApi.tsin an IDEDrainNodeStatustype or theStreamResultsParamsinterface.Screenshots (if applicable)
Notes for the Reviewer
@todocomments left by previous developers. No logic changes were made, only JSDoc additions to improve code readability and editor tooling support.