Swagger UI rating-id not attached to query
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 /ratings/rate-values the SwaggerUI does not properly insert the rating-id into the URL
Expected behavior
Expect the rating-id to be placed into the URL and properly URI encoded
To Reproduce
- Navigate to swagger,
- Click "try it out"
- Enter "office" and "rating-id".
- Keep body as is just to see rating-id is not passed through
- Click execute
- Observe the sample URL it shows
Logs/Incident Identifier
I confirmed when querying this that the backend says
{
"message": "Bad Request.",
"incidentIdentifier": "16568336-984a-4c6a-a9cd-968d766f5d27",
"source": "User Input",
"details": {
"message": "ORA-20019: INVALID_ITEM: \"{rating-id}\" is not a valid rating specification."
}
}
Suggesting '{rating-id}' was passed through as an actual rating ID
CURL Commands
I confirmed the rate-values endpoint still works with
fetch(
"https://cwms-data.usace.army.mil/ratings/rate-values/SWT/KEYS.Opening-Spillway_Gates%2CElev%3BFlow-Spillway_Gates.Standard.Production",
{
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"output-unit": "cfs",
round: false,
values: [[0.5], [725.2499999999999]],
"input-units": ["ft", "ft"],
"rating-time": 1776094200000,
"value-times": [1776094200000],
}),
},
)
.then((r) => r.json())
.then((d) => console.log(d));
CDA Version (please complete the following information):
- Version [ 2026.03.06-testa ] on our T7 (SWT)
I attempted this on Test and Dev but these do not have our ratings (Surprised Test did not have it)
Additional context
Helping @DanielTOsborne figure out why rate-values was not working. Still not sure on that but I thought to report this swagger bug.
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 by reproducing the request in Swagger UI for the POST /ratings/rate-values endpoint, using the reported rating ID and comparing its generated URL with the working fetch example. Trace the Swagger/OpenAPI definition for this endpoint and verify that rating-id is substituted and URI encoded rather than sent literally; done means the sample URL contains the encoded rating ID and the request succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100