mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 18:50:04 -03:30
warn about endpoint deprecation in the CLI
This commit is contained in:
@@ -205,6 +205,9 @@ class APIView(views.APIView):
|
||||
response['X-API-Query-Count'] = len(q_times)
|
||||
response['X-API-Query-Time'] = '%0.3fs' % sum(q_times)
|
||||
|
||||
if getattr(self, 'deprecated', False):
|
||||
response['Warning'] = '299 awx "This resource has been deprecated and will be removed in a future release."' # noqa
|
||||
|
||||
return response
|
||||
|
||||
def get_authenticate_header(self, request):
|
||||
|
||||
Reference in New Issue
Block a user