From bfe82d43c06fdd1d3e4319f2ca29033ac62c9a6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= <zebuline@entrouvert.com>
Date: Mon, 8 Jun 2020 09:40:57 +0200
Subject: [PATCH] misc: don't show deprecated endpoints (#43709)

---
 passerelle/apps/api_particulier/models.py | 8 ++++++--
 passerelle/apps/arcgis/models.py          | 3 ++-
 passerelle/apps/solis/models.py           | 4 ++--
 passerelle/apps/sp_fr/models.py           | 4 ++--
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/passerelle/apps/api_particulier/models.py b/passerelle/apps/api_particulier/models.py
index a3744f2e..46dcf913 100644
--- a/passerelle/apps/api_particulier/models.py
+++ b/passerelle/apps/api_particulier/models.py
@@ -120,7 +120,8 @@ class APIParticulier(BaseResource):
         }
 
     @endpoint(perm='can_access',
-              description=_('Get citizen\'s fiscal informations (deprecated URL)'),
+              show=False,
+              description=_('Get citizen\'s fiscal informations'),
               parameters={
                   'numero_fiscal': {
                       'description': _('fiscal identifier'),
@@ -136,6 +137,7 @@ class APIParticulier(BaseResource):
                   },
               })
     def impots_svair(self, request, numero_fiscal, reference_avis, user=None):
+        # deprecated endpoint
         return self.v2_avis_imposition(request, numero_fiscal, reference_avis, user=user)
 
     @endpoint(name='avis-imposition',
@@ -164,7 +166,8 @@ class APIParticulier(BaseResource):
         }, user=user)
 
     @endpoint(perm='can_access',
-              description=_('Get family allowances recipient informations (deprecated URL)'),
+              show=False,
+              description=_('Get family allowances recipient informations'),
               parameters={
                   'code_postal': {
                       'description': _('postal code'),
@@ -180,6 +183,7 @@ class APIParticulier(BaseResource):
                   },
               })
     def caf_famille(self, request, code_postal, numero_allocataire, user=None):
+        # deprecated endpoint
         return self.v2_situation_familiale(request, code_postal, numero_allocataire, user=user)
 
     @endpoint(name='situation-familiale',
diff --git a/passerelle/apps/arcgis/models.py b/passerelle/apps/arcgis/models.py
index e6c7f3e9..5b729cf0 100644
--- a/passerelle/apps/arcgis/models.py
+++ b/passerelle/apps/arcgis/models.py
@@ -170,13 +170,14 @@ class ArcGIS(BaseResource, HTTPResource):
         return {'data': data}
 
     @endpoint(name='district',
-              description=_('Districts in Nancy Town (deprecated)'),
+              description=_('Districts in Nancy Town'),
               parameters={
                   'lat': {'description': _('Latitude')},
                   'lon': {'description': _('Longitude')},
               },
               show=False)
     def district(self, request, lon=None, lat=None):
+        # deprecated endpoint
         if 'NANCY_Grc' in self.base_url:
             # Nancy URL used to contains folder, service and layer, remove them
             self.base_url = 'https://geoservices.grand-nancy.org/arcgis/rest/'
diff --git a/passerelle/apps/solis/models.py b/passerelle/apps/solis/models.py
index 63524da8..30ccb856 100644
--- a/passerelle/apps/solis/models.py
+++ b/passerelle/apps/solis/models.py
@@ -132,9 +132,9 @@ class Solis(BaseResource):
             raise APIError('invalid response: %r' % pong, data=pong)
         return {'data': 'pong', 'response': pong.get('response')}
 
-    @endpoint(name='ping', description=_('Check Solis API availability'))
+    @endpoint(name='ping', show=False, description=_('Check Solis API availability'))
     def ping(self, request):
-        # FIXME deprecated this endpoint (replaced by 'up' endpoint)
+        # deprecated endpoint
         return self.check_status()
 
     @endpoint(name='referential', perm='can_access',
diff --git a/passerelle/apps/sp_fr/models.py b/passerelle/apps/sp_fr/models.py
index 110ff066..ab65f318 100644
--- a/passerelle/apps/sp_fr/models.py
+++ b/passerelle/apps/sp_fr/models.py
@@ -106,9 +106,9 @@ class Resource(BaseResource):
             sftp.listdir()
         get_wcs_choices(session=self.requests)
 
-    @endpoint(name='ping', description=_('Check Solis API availability'))
+    @endpoint(name='ping', show=False, description=_('Check Solis API availability'))
     def ping(self, request):
-        # FIXME deprecated this endpoint (replaced by 'up' endpoint)
+        # deprecated endpoint
         self.check_status()
         return {'err': 0}
 
-- 
2.20.1

