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
Collaborator

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

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>
ali added 1 commit 2026-08-22 03:57:27 -04:00
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>
ali added 1 commit 2026-08-22 09:34:43 -04:00
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>
ali added 1 commit 2026-08-22 10:01:22 -04:00
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>
Ghasemi merged commit 6796922fe6 into master 2026-08-23 02:47:05 -04:00
Ghasemi deleted branch feature/filter-stores 2026-08-23 02:47:05 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: addwin/winofy-backend#4
No description provided.