Added deprecation notice to /hwinfo/dtdata (#4331)

diff --git a/traffic_ops/app/lib/API/HwInfo.pm b/traffic_ops/app/lib/API/HwInfo.pm
index 15ef143..602706e 100644
--- a/traffic_ops/app/lib/API/HwInfo.pm
+++ b/traffic_ops/app/lib/API/HwInfo.pm
@@ -119,7 +119,7 @@
 	my %itotal_records = ( iTotalDisplayRecords => $total_records );
 	%data = %{ merge( \%data, \%itotal_records ) };
 
-	$self->render( json => \%data );
+	$self->deprecation_with_no_alternative(200, json => \%data );
 }
 
 1;
diff --git a/traffic_ops/app/lib/MojoPlugins/Response.pm b/traffic_ops/app/lib/MojoPlugins/Response.pm
index 977121a..d636ab5 100644
--- a/traffic_ops/app/lib/MojoPlugins/Response.pm
+++ b/traffic_ops/app/lib/MojoPlugins/Response.pm
@@ -170,6 +170,23 @@
 		}
 	);
 
+	$app->renderer->add_helper(
+		deprecation_with_no_alternative => sub {
+			my $self = shift || confess("Call on an instance of MojoPlugins::Response");
+			my $code = shift || confess("Please supply a response code e.g. 400");
+			my $response_object = shift;
+
+			my $builder ||= MojoPlugins::Response::Builder->new($self, @_);
+			my @alerts_response = ({$LEVEL_KEY => $WARNING_LEVEL, $TEXT_KEY => "This endpoint and its functionality is deprecated, and will be removed in the future"});
+
+			if (defined($response_object)) {
+				return $self->render( $STATUS_KEY => $code, $JSON_KEY => { $ALERTS_KEY => \@alerts_response, $RESPONSE_KEY => $response_object } );
+			} else {
+				return $self->render( $STATUS_KEY => $code, $JSON_KEY => { $ALERTS_KEY => \@alerts_response } );
+			}
+		}
+	);
+
 	# Alerts (500)
 	$app->renderer->add_helper(
 		internal_server_error => sub {