Skip to content

BUG: Swagger UI uses incorrect server URL (52123) while backend runs on 8000 #984

@prabalpatkar558412-collab

Description

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Description

When running the PictoPy backend locally using uvicorn on port 8000,
the Swagger UI (/docs) sends API requests to http://localhost:52123,
which causes all API calls to fail with "Failed to fetch".

Steps to Reproduce

  1. Run backend using: python -m uvicorn main:app --reload
  2. Open http://127.0.0.1:8000/health → works correctly
  3. Open http://127.0.0.1:8000/docs
  4. Try any endpoint (e.g. POST /folders/add-folder)
  5. The request is sent to http://localhost:52123 and fails

Expected Behavior

Swagger UI should use the same server URL/port as the running backend (8000).

Actual Behavior

Swagger UI uses a hardcoded server URL pointing to port 52123.

Additional Context

Backend is running correctly on port 8000.
I would like to work on fixing this issue.

Record

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions