Skip to content
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

EPIC: Migrate API to django-ninja #1530

Open
8 tasks
robhudson opened this issue Oct 31, 2024 · 0 comments
Open
8 tasks

EPIC: Migrate API to django-ninja #1530

robhudson opened this issue Oct 31, 2024 · 0 comments
Assignees

Comments

@robhudson
Copy link
Contributor

robhudson commented Oct 31, 2024

Description:

Migrate basket API to django-ninja.

Django-ninja offers:

  • Built-in Data Validation: Django Ninja offers automatic request and response validation using Pydantic
  • Type Safety: With type hints, we can ensure type correctness on request and response data, making code more reliable and consistent across APIs and responses
  • Auto-Generated Documentation: Django Ninja automatically generates an OpenAPI schema, making API documentation consistent and easy to update, and providing a user-friendly interface for using or testing the API

Tasks

keep untouched

  • /news/subscribe/: This is a form-encoded endpoint and used outside Mozilla.

news

  • /news/newsletters/ -> /api/v1/news/newsletters/
  • /news/unsubscribe/<uuid:token>/ -> /api/v1/news/unsubscribe/<uuid:token>/
  • /news/custom_unsub_reason/ -> /api/v1/news/unsubscribe_reason/

users

  • /news/user/<uuid:token>/ -> /api/v1/users/<uuid:token>/
  • /news/user-meta/<uuid:token>/ -> /api/v1/users/meta/<uuid:token>/
  • /news/lookup-user/ -> /api/v1/users/lookup/
  • /news/confirm/<uuid:token>/ -> /api/v1/users/confirm/<uuid:token>/
  • /news/recover/ -> /api/v1/users/recover/

TBD

  • /news/common-voice-goals/ - we still get data here.

All other URLs will remain as-is.

@robhudson robhudson self-assigned this Oct 31, 2024
robhudson added a commit that referenced this issue Nov 13, 2024
This adds:
- /api/v1/news/newsletters/
- /api/v1/users/lookup/
robhudson added a commit that referenced this issue Nov 13, 2024
This adds:
- /api/v1/news/newsletters/
- /api/v1/users/lookup/
robhudson added a commit that referenced this issue Nov 13, 2024
This adds:
- /api/v1/news/newsletters/
- /api/v1/users/lookup/
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

No branches or pull requests

1 participant