USACE / USACE/cwms-data-api

V1 of the Counties Endpoint is Broken

Open
#638 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

automation-tests
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

Automation Testing for CWMSjs - /counties

If you do not specify version 2 for the counties endpoint:

 curl -X 'GET'   'https://cwms-data.usace.army.mil/cwms-data/counties'

You get

{"message":"Formatting error:No Format for this content-type and data type : (application/json, cwms.cda.data.dto.County)","incidentIdentifier":"6047006616993122670","details":{}}
V1 - and return size
curl -s -o /dev/null -w "%{size_download}\n" https://cwms-data.usace.army.mil/cwms-data/counties

Gives
180

curl -s -o /dev/null -w "%{size_download}\n" https://cwms-data.usace.army.mil/cwms-data/counties -H 'accept: application/json;version=2'

Gives
195002
And the data is valid

Should we go ahead and remove V1 for this and return the source for V2 for all endpoints?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the /counties requests shown in the issue, comparing the default response with accept: application/json;version=2. Then inspect the endpoint's version handling and existing API tests to determine whether V1 should be removed or corrected. Done means the chosen behavior is documented by tests and the endpoint returns a valid response for the supported version.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.