Skip to content

feat(ws): add @ID swag annotation for better codegen readability #488

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

Open
wants to merge 1 commit into
base: notebooks-v2
Choose a base branch
from

Conversation

andyatmiami
Copy link
Contributor

@andyatmiami andyatmiami commented Jul 17, 2025

related: #46

  • added @ID annotations for all API routes to populate operationId Swagger attribute
  • split GetWorkspacesHandler into 2 separate handlers to account for @id needing to be unique-per-route
    • GetAllWorkspacesHandler now services GET /workspaces
    • GetWorkspacesByNamespaceHandler now services GET /workspaces/{namespace}
    • non-exported getWorkspacesHandler function contains all business logic that existed in GetWorkspacesHandler
  • Adjusted test cases to align with the new handler names.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kimwnasptd for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added the area/backend area - related to backend components label Jul 17, 2025
@google-oss-prow google-oss-prow bot added area/v2 area - version - kubeflow notebooks v2 size/L labels Jul 17, 2025
@andyatmiami andyatmiami force-pushed the feat/swagger-operationId branch from 47698ea to 77634fa Compare July 17, 2025 21:12
- added @id annotations for all API routes to populate operationId Swagger attribute
- split GetWorkspacesHandler into 2 separate handlers to account for @id needing to be unique-per-route
    - GetAllWorkspacesHandler now services GET /workspaces
    - GetWorkspacesByNamespaceHandler now services GET /workspaces/{namespace}
    - non-exported getWorkspacesHandler function contains all business logic that existed in GetWorkspacesHandler
- Adjusted test cases to align with the new handler names.

Signed-off-by: Andy Stoneberg <[email protected]>
@caponetto
Copy link

/lgtm

@thesuperzapper
Copy link
Member

/ok-to-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend area - related to backend components area/v2 area - version - kubeflow notebooks v2 lgtm ok-to-test size/L
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

3 participants