Skip to content

DRF Ecosystem Compatibility Boundaries ​

VUEDA's server builds on DRF, django-filter, drf-flex-fields2, and drf-writable-nested. Its defaults change some of their behavior. A client written for plain DRF meets different parameter names, stricter validation, and different response bodies. This page lists each departure briefly and links the page that describes it.

Query Parameter Names ​

DRF's DRF: SearchFilter and DRF: OrderingFilter read search and ordering by default, and drf-flex-fields2 reads expand, fields, and omit. VUEDA sets short names for these and for pagination and column totals: s, o, p, ps, e, f, om, and ct. These are the Wire Query Parameters. The client holds each name as a constant, so a rename on the server needs the same change on the client. Configuration Surface and Defaults lists each name with its server setting and client constant.

Default Filter Backends ​

DRF configures no filter backend by default. VUEDA's REST_FRAMEWORK defaults run three on every list endpoint, in this order:

  1. VuedaOrderingFilter extends OrderingFilter. It applies a view's nulls placement to requested ordering, and it accepts every field in the view's default ordering as an o value.
  2. VuedaSearchFilterBackend extends SearchFilter with the search prefixes # (trigram similarity), ~ (word similarity), and V: (ranked search). It runs after ordering so that ordering does not reorder ranked results. A search field that reaches through a many-valued relation matches inside a subquery, built from the model's default manager or the viewset's get_search_queryset(). SearchFilter instead copies the viewset's queryset, filters and aggregates included. Search through a many-valued relation describes the rule.
  3. django-filter's DjangoFilterBackend applies the viewset's filterset_class.

A viewset that sets its own filter_backends replaces this list. Filtering and Ordering Semantics describes each backend's rules.

Unknown Input Returns 400 ​

DRF ignores query parameters that a view does not read and request body keys that a serializer does not declare. VUEDA answers both with a 400 validation error that names the valid choices:

A typo or a stale client gets an error that names the valid keys. An integration that adds its own query parameters or body keys fails until the viewset or serializer declares them.

Response Bodies and Authentication ​

VUEDA's defaults change these responses and the accepted credentials:

Registration Gates Model Info ​

In plain DRF, a viewset and a router entry give a model its REST API. VUEDA's Model Info endpoints also require the model's Canonical Registration through info.registration. A model with a viewset but no registration has a REST API but no model info, which the default UI needs to build its views. Canonical Registration and Model Discovery describes registration.

Flex Fields with Nested Writes ​

VuedaSerializer combines drf-flex-fields2 expansion with drf-writable-nested writes. Field and Expand Semantics describes Expand and Sparse Fields. Nested Write Compatibility describes what changes when the two packages share one serializer.

Composite Primary Keys ​

VuedaSerializer maps Django's Django: CompositePrimaryKey to CompositePrimaryKeyField without a field declaration. VuedaViewSet.get_object reads the key from the URL as a JSON list. Set Up CRUD for a Composite Primary Key Model gives the URL format and how to pass the key to Django: reverse.