refactor(external_data): rename corporation memberships route
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
- [x] **Pass 2 — Пользователи и аутентификация:** доработка `users/me` + user-management.
|
||||
- [x] **Pass 3 — Формы:** выравнивание upload F-2…F-6.
|
||||
- [x] **Pass 4 — Аналитика:** financial-summary / economics / personnel / equipment / products / risk / forecast.
|
||||
- [x] **Pass 5 — Внешние контуры:** industrial/prosecutor/procurements/arbitration/security registries.
|
||||
- [x] **Pass 5 — Внешние контуры:** industrial/prosecutor/procurements/arbitration/corporation-memberships.
|
||||
- [x] **Pass 6 — Финализация:** OpenAPI + массовое тестирование + smoke.
|
||||
|
||||
### Журнал выполненных шагов
|
||||
@@ -50,7 +50,7 @@
|
||||
- `financial-summary`, `economics`, `personnel`, `equipment`, `products`, `forecast`, `risk-profile`, `dashboard`.
|
||||
- дополнена проверка query-валидации для invalid `economics`-запроса.
|
||||
- **Pass 5 — Внешние контуры (2026-04-14): завершён**
|
||||
- добавлен endpoint `security-registries/` с фильтрами `organization` и `presence_status`.
|
||||
- добавлен endpoint `corporation-memberships/` с фильтрами `organization` и `presence_status`.
|
||||
- расширены contract checks для внешних списков (prod/products/prosecutor/public-procurement/arbitration/security).
|
||||
- **Pass 6 — Финализация (2026-04-14): завершён**
|
||||
- доработан выбор "последней" фоновой задачи в `admin/users` по фактическому временному событию:
|
||||
@@ -204,7 +204,7 @@
|
||||
- Проверить фильтры дат и enum-валидаторы.
|
||||
- Свести response к единой форме пагинации.
|
||||
|
||||
### 5.3 Новый `GET /api/v1/security-registries/`
|
||||
### 5.3 Новый `GET /api/v1/corporation-memberships/`
|
||||
- Добавить модель/миграцию/serializer/viewset при отсутствии.
|
||||
- Добавить фильтр по `organization`, `presence_status` и пагинацию.
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
### Pass 5. Внешние данные
|
||||
- [x] Довести внешние реестры к единообразным фильтрам/ответам. (2026-04-14)
|
||||
- [x] Добавить `security-registries`. (2026-04-14)
|
||||
- [x] Добавить `corporation-memberships`. (2026-04-14)
|
||||
|
||||
### Pass 6. Финализация
|
||||
- [x] Обновить OpenAPI по всем контрактам.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
| 5 | GET /api/v1/prosecutor-checks/ | Есть | Проверить filters | API | Проверить `law_type`, дата-диапазон |
|
||||
| 5 | GET /api/v1/public-procurements/ | Есть | Проверить filters | API | Проверить `law_type`, дата-диапазон |
|
||||
| 5 | GET /api/v1/arbitration-cases/ | Есть | Проверить filters | API | Проверить `party_role`, дата-диапазон |
|
||||
| 5 | GET /api/v1/security-registries/ | Нет | Отсутствует endpoint | NEW | Добавить сущность/endpoint/фильтр |
|
||||
| 5 | GET /api/v1/corporation-memberships/ | Нет | Отсутствует endpoint | NEW | Добавить сущность/endpoint/фильтр |
|
||||
| 6 | OpenAPI | Частично | Недостаточная детализация multipart/error | DOC | Обновить документацию для всех touched endpoints |
|
||||
|
||||
## Риск-реестр (Pass 1)
|
||||
|
||||
@@ -131,7 +131,7 @@ OPENAPI_TAG_BY_PATH_PREFIX = OrderedDict(
|
||||
("/api/v1/prosecutor-checks/", "Внешние данные"),
|
||||
("/api/v1/public-procurements/", "Внешние данные"),
|
||||
("/api/v1/arbitration-cases/", "Внешние данные"),
|
||||
("/api/v1/security-registries/", "Внешние данные"),
|
||||
("/api/v1/corporation-memberships/", "Внешние данные"),
|
||||
("/api/v1/registers/", "Реестры"),
|
||||
("/api/v1/forms/f1/", "Форма Ф-1"),
|
||||
("/api/v1/forms/f2/", "Форма Ф-2"),
|
||||
|
||||
@@ -26,9 +26,9 @@ router.register(
|
||||
"arbitration-cases", ArbitrationCaseViewSet, basename="arbitration-cases"
|
||||
)
|
||||
router.register(
|
||||
"security-registries",
|
||||
"corporation-memberships",
|
||||
InformationSecurityRegistryEntryViewSet,
|
||||
basename="security-registries",
|
||||
basename="corporation-memberships",
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
@@ -91,7 +91,7 @@ class ExternalDataApiTest(APITestCase):
|
||||
self.assertEqual(arbitration_response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(arbitration_response.data["count"], 1)
|
||||
|
||||
def test_information_security_registry_entries_filter(self):
|
||||
def test_corporation_memberships_filter(self):
|
||||
InformationSecurityRegistryEntryFactory(
|
||||
organization=self.organization,
|
||||
presence_status="present",
|
||||
@@ -102,7 +102,7 @@ class ExternalDataApiTest(APITestCase):
|
||||
)
|
||||
|
||||
response = self.client.get(
|
||||
f"/api/v1/security-registries/?organization={self.organization.id}"
|
||||
f"/api/v1/corporation-memberships/?organization={self.organization.id}"
|
||||
"&presence_status=present"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user