Skip to content

Comments

Integrate exports router into API#520

Merged
shayancoin merged 2 commits intomainfrom
codex/update-api-routing-for-exports
Oct 21, 2025
Merged

Integrate exports router into API#520
shayancoin merged 2 commits intomainfrom
codex/update-api-routing-for-exports

Conversation

@shayancoin
Copy link
Owner

Summary

  • add an exports router that wraps CNC endpoints behind the shared write token dependency
  • mount the exports router on the API aggregate router and register it with the FastAPI app in place of the CNC router

Testing

  • poetry run pytest tests/test_routes_quote_cnc.py (fails: AttributeError: 'property' object has no attribute 'schema')

https://chatgpt.com/codex/tasks/task_e_68f72bf9d4448330bd680c8f95d004fc

@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
paform Ready Ready Preview Comment Oct 21, 2025 6:57am

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Warning

Rate limit exceeded

@shayancoin has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6009ef3 and fbe858d.

📒 Files selected for processing (3)
  • backend/api/exports.py (1 hunks)
  • backend/api/main.py (2 hunks)
  • backend/api/routes.py (2 hunks)
✨ Finishing touches
  • 📝 Docstrings were successfully generated.
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-api-routing-for-exports

Comment @coderabbitai help to get the list of available commands and usage tips.

@shayancoin shayancoin merged commit 5014d11 into main Oct 21, 2025
1 of 4 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Caution

Docstrings generation - FAILED

No docstrings were generated.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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 on lines 22 to +24
# Mount routers
router.include_router(shopify_router)
router.include_router(exports_router)

Choose a reason for hiding this comment

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

P1 Badge Avoid registering exports router twice with different prefixes

exports_router is included on the aggregate API router and again on the FastAPI app, even though it already wraps routes_cnc (whose path prefix is /api/cnc). The inclusion in backend/api/routes.py adds another /api prefix, so the same endpoint tree is mounted a second time at /api/api/cnc, which causes FastAPI’s schema generation to blow up with AttributeError: 'property' object has no attribute 'schema' and leaves duplicate paths exposed. Register the router in only one place or adjust prefixes so each export route is added once.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant