Skip to content

Updated endpoint for the test server in swagger documentation. - #1896

Open
SevLG wants to merge 2 commits into
devfrom
HMS-2123-swagger-testing-url-fix
Open

SevLG wants to merge 2 commits into
devfrom
HMS-2123-swagger-testing-url-fix

Conversation

@SevLG

@SevLG SevLG commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Template

Before Marking as Ready for Review

  • Add relevant information to the sections below (Summary etc)
  • Rebase or merge the latest dev (or other targeted branch)
  • Update documentation if needed
  • Add an entry to the SPRINTLOG.md if needed
  • Choose an appropriate label. See here for information on the labelling options
  • The code follows the style guidelines
  • Perform a self-review: read the diff as if reviewing someone else's code
  • I have commented the code, particularly in hard-to-understand areas
  • Verify that all checks and tests have passed

If the target branch is master:

Summary

Updated v3 endpoint URL in swagger documentation to the current testing.delivery.scilifelab.se one.

Related Issue/Ticket

https://scilifelab.atlassian.net/browse/HMS-2123

Testing

Built with docker compose, then visited localhost:5000/api/documentation/v3 to see that the new URL is there.

Reviewer Notes

The Jira task suggested investigating a way to do this without hard coding. I looked around a bit but I don't think there's a smooth way to do that. The hostname "testing.delivery.scilifelab.se" is only defined in the argocd repository manifest.

Currently, the testing hostname is just "testing." + the prod hostname. So one solution could be to decide that we should always follow this format. However, the prod hostname is also just hard coded in the same file, so there isn't anything to gain from turning the testing hostname into a variable based on the prod hostname currently.


Once all boxes are checked, mark the PR as Ready for Review and tag at least one team member as the initial reviewer.

@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.88%. Comparing base (cc15483) to head (c63407d).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1896   +/-   ##
=======================================
  Coverage   92.88%   92.88%           
=======================================
  Files          30       30           
  Lines        5077     5077           
=======================================
  Hits         4716     4716           
  Misses        361      361           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SevLG
SevLG marked this pull request as ready for review November 27, 2026 13:02
@SevLG
SevLG requested a review from a team as a code owner November 27, 2026 13:02
- url: https://dds-dev.dckube3.scilifelab.se/api/v3
- url: https://testing.delivery.scilifelab.se/api/v3/
description: Endpoint for the test server
# Uncomment when local testing

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a relative server URL would solve it. With - url: /api/v3 the docs page on each instance (prod, testing, dev, local) points to itself, and we could drop the "Uncomment when local testing" lines as well. The Swagger UI we ship resolves a relative server URL against the host the page is on.

The hardcoded hosts don't work across instances in "Try it out" anyway, since neither prod nor testing sends CORS headers. So on the prod docs page, picking the test server gets blocked by the browser.

Not necessarily a blocker since it works.

@samanrassam samanrassam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but dds_web/static/swagger.yaml (the v1 docs) still has the old dds-dev.dckube3.scilifelab.se host on line 38. It's not in public DNS anymore, and the v3 page tells people to use the v1 docs for now, so I think we should fix both in this PR.
Suggested a change in swaggerv3.yaml too with the usage of a relative URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants