WeblateOrg / WeblateOrg/weblate

Nested API endpoints improvements

Open
#4,096 3 comments 0 reactions 0 assignees View on GitHub
Area: API enhancement Waiting for: Demand
Dominant language
Python
Stars
6.1k
Forks
1.4k
Avg merge
9h 53m
Merged PRs (30d)
395

Description

Right now there is at least changes API which is duplicated in multiple endpoints - global and per project, component and translation

The global one uses own viewset with defined filtering and so on, while the scoped ones implement this manually.

There must be a way to reuse the existing viewset in these scopes. This will bring filtering into the UI and avoid issues like #4095 in future (what will become more important as features of the API grow).

This in general applies to other endpoints as well - there are many methods which in fact duplicate viewset functionality. Quickly looking at least following should be affected: ComponentViewSet.translations, ComponentViewSet.screenshots, TranslationViewSet.units, UserViewSet.notifications, ProjectViewSet.components

https://github.com/alanjds/drf-nested-routers might be way to go

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.