Skip to content

Chore/postman collection - #13

Merged
sal94 merged 4 commits into
devfrom
chore/postman-collection
Dec 5, 2025
Merged

Chore/postman collection#13
sal94 merged 4 commits into
devfrom
chore/postman-collection

Conversation

@sal94

@sal94 sal94 commented Dec 5, 2025

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test_docs.py
Comment on lines +9 to +10
resp = await api_client.get("/docs")
assert resp.status_code == 200

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update docs tests to use /api-prefixed endpoints

FastAPI is now created with docs_url and openapi_url set to f"{API_PREFIX}/…" (app/main.py lines 13-14, with API_PREFIX /api), so these new tests still calling /docs (and the OpenAPI check below calling /openapi.json) will get 404s and fail the suite; the requests need to hit /api/docs and /api/openapi.json to match the configured docs endpoints.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex fix that

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Updated docs and OpenAPI tests to request the /api-prefixed documentation endpoints in line with the FastAPI configuration. tests/test_docs.pyL7-L20

Testing

  • Not run (not requested).

View task →

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex you should always run tests, check this line out:

@pytest_asyncio.fixture
async def api_client(worker_db: dict[str, str]) -> AsyncGenerator[AsyncClient, None]:
async def _override_get_session() -> AsyncGenerator[AsyncSession, None]:
async with db_mod.AsyncSessionLocal() as session:
yield session

fastapi_app.dependency_overrides[get_session] = _override_get_session

async with AsyncClient(
    transport=ASGITransport(app=fastapi_app), base_url="http://testserver/api"
) as ac:
    try:
        yield ac
    finally:
        fastapi_app.dependency_overrides.clear()

Base url starts with /api/ already!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Updated documentation and OpenAPI tests to request endpoints relative to the API-prefixed base URL, aligning with the FastAPI configuration. tests/test_docs.pyL8-L20

Testing

  • ⚠️ pytest tests/test_docs.py (fails: connection refused to localhost:5432 because Postgres is not running in this environment).

View task →

@sal94
sal94 merged commit af84023 into dev Dec 5, 2025
2 checks passed
@sal94
sal94 deleted the chore/postman-collection branch December 5, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant