-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SRCH-2336 deprecate /api/search endpoint (#742)
- add comments re. the deprecated Agencies API
- Loading branch information
1 parent
9dac642
commit d21539b
Showing
9 changed files
with
41 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# deprecated: SRCH-1574 | ||
module Api | ||
module V1 | ||
class AgenciesController < ApplicationController | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Api | ||
module V1 | ||
class SearchController < ApplicationController | ||
DEPRECATION_MESSAGE = 'This API endpoint has been deprecated. Please refer to https://search.gov/developer/ for information on current Search.gov APIs.' | ||
|
||
def search | ||
render plain: DEPRECATION_MESSAGE, status: :not_found | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# deprecated: SRCH-1574 | ||
module Api | ||
module V2 | ||
class AgenciesController < ApplicationController | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
describe '/api/search' do | ||
let(:endpoint) { '/api/search' } | ||
|
||
before { get endpoint } | ||
|
||
it 'returns a 404' do | ||
expect(response.status).to eq 404 | ||
end | ||
|
||
it 'provides a useful message' do | ||
expect(response.body).to match(/This API endpoint has been deprecated/) | ||
end | ||
end |