mozilla / mozilla/pontoon

Warnings when opening /api/v2

Open
#4,531 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

hours P4
Dominant language
Python
Stars
1.7k
Forks
611
Avg merge
1d 19h
Merged PRs (30d)
49

Description

I see this in the log when I open http://localhost:8000/api/v2/

[server] /app/pontoon/api/views.py: Error [UserActionsView]: unable to guess serializer. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. Either way you may want to add a serializer_class (or method). Ignoring view for now.
[server] Warning: operationId "entities_retrieve" has collisions [('/api/v2/entities/{id}/', 'get'), ('/api/v2/entities/{project}/{resource}/{entity}/', 'get')]. resolving with numeral suffixes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with /app/pontoon/api/views.py and reproduce the warnings by opening http://localhost:8000/api/v2/. Trace the serializer warning for UserActionsView and the colliding entities operation IDs; done means opening the API endpoint no longer produces these warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.