Skip to content

fix(ws): honor PORT in swagger UI and clean up backend README #482

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

⚠️ No GH issue ⚠️

This commit makes 2 improvements to our existing Swagger implementation in the backend component

  • overrides openapi.SwaggerInfo.Host at runtime to ensure the PORT value (which may have been overriden to != 4000) is properly reflected in the generated Swagger HTML
  • Updates the backend README.md to instruct the reader to run the backend application and visit the Swagger webpage to learn about the available APIs.
    • Removal of the markdown table and sample calls helps remove pointless developer toil and/or potential of stale/conflicting info as that information had to be manually maintained.

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 thesuperzapper 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 11, 2025
@google-oss-prow google-oss-prow bot added area/v2 area - version - kubeflow notebooks v2 size/L labels Jul 11, 2025
@andyatmiami
Copy link
Contributor Author

Old behavior:

image

New behavior:

image

This commit makes 2 improvements to our existing Swagger implementation in the `backend` component
- overrides openapi.SwaggerInfo.Host at runtime to ensure the `PORT` value (which may have been overriden to != `4000`) is properly reflected in the generated Swagger HTML
- Updates the `backend` `README.md` to instruct _the reader_ to run the `backend` application and visit the Swagger webpage to learn about the available APIs.
    - Removal of the markdown table and sample calls helps remove pointless developer toil and/or potential of stale/conflicting info as that information had to be manually maintained.

Signed-off-by: Andy Stoneberg <[email protected]>
@andyatmiami andyatmiami force-pushed the fix/swagger-improve branch from b9c19ad to c5c2c95 Compare July 11, 2025 21:14
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 size/L
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

1 participant