Add search to city/neighborhood endpoints; document filters for swagger #4

Merged
Ghasemi merged 3 commits from feature/filter-stores into master 2026-08-23 02:47:05 -04:00

3 commits

Author SHA1 Message Date
eb5eb38665 Migrate manual query-param filtering to django-filter
django-filter was already installed and set as DEFAULT_FILTER_BACKENDS
but unused everywhere. Replace hand-rolled get_queryset filtering with
FilterSet classes (stores/catalog/locations/reviews) and
filterset_fields (orders status). drf-spectacular auto-documents these
for swagger, so the manual OpenApiParameter declarations for the
migrated fields are removed (stores keeps lat/lng manual since
geo-distance isn't a plain filter).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 17:31:01 +03:30
755d74a9ff Return phone_number and distance_km on store list
phone_number was only exposed on the store detail serializer; add it
to the list too. Also surface the distance annotation (already
computed when lat/lng are passed) as distance_km on both, instead of
using it only for ordering.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 17:04:21 +03:30
fa9a69fff3 Add search to city/neighborhood endpoints; document filters for swagger
Neighborhood filtering was UUID-only; add name-based search on both
GET /api/v1/cities/ and GET /api/v1/neighborhoods/ (the latter also
matching by city name), and document all params for drf-spectacular.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 11:25:45 +03:30