[Bug]: Water Supply Accounting catalog endpoint not respecting default row limit
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 28
- Forks
- 25
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 20
Description
Describe the bug
When querying the water supply contract accounting catalog endpoint, the default row limit is 0. This is documented as being equivalent to no limit, but testing shows that no results are returned unless a value greater than 0 is provided.
Expected behavior
I would expect no row limit when the default value of 0 is used.
To Reproduce
- GET from the accounting endpoint with no row limit parameter specified.
- Receive no accounting records
- Repeat step 1, specifying a row limit of 100
- Receive accounting records
Priority
Medium
Logs/Incident Identifier
No response
CURL Commands
CDA Version
latest-dev
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at cwms-data-api/src/main/java/cwms/cda/api/watersupply/AccountingCatalogController.java around line 119 and reproduce the accounting catalog request without a row-limit parameter. Compare it with the same request using a limit of 100; done means the default value of 0 returns accounting records rather than an empty response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100