Skip to content

CDA-98 - Creating /v2/forecast-spec endpoint using updated spec struture - #1872

Open
rma-bryson wants to merge 5 commits into
developfrom
bugfix/CDA-98-forecast-spec-updates
Open

CDA-98 - Creating /v2/forecast-spec endpoint using updated spec struture#1872
rma-bryson wants to merge 5 commits into
developfrom
bugfix/CDA-98-forecast-spec-updates

Conversation

@rma-bryson

@rma-bryson rma-bryson commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Established use of /v2/ with forecast-spec update to use locations with sort-order

Related Issue

Closes #1648

Validation

Unit tests and Integration tests

Checklist

  • AI tools used

@rma-bryson
rma-bryson force-pushed the bugfix/CDA-98-forecast-spec-updates branch 12 times, most recently from 28a2e7d to bad214e Compare August 13, 2026 17:09
@rma-bryson
rma-bryson marked this pull request as ready for review August 13, 2026 19:34
@rma-bryson rma-bryson changed the title CDA-98 - Creating /v2/forecast-spec endpoint using updated spec struc… CDA-98 - Creating /v2/forecast-spec endpoint using updated spec struture Aug 13, 2026
Comment thread cwms-data-api/src/main/java/cwms/cda/api/v2/ForecastSpecControllerV2.java Outdated

@MikeNeilson MikeNeilson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable, though I agree with @adamkorynta 's comments. Good to see a screenshot of the UI.

…ture. Updates OpenApiDocTest to check parent controller class. Adds route configuration support for v2 endpoints.
@rma-bryson
rma-bryson force-pushed the bugfix/CDA-98-forecast-spec-updates branch from c9a25ff to 148f8dc Compare August 20, 2026 19:16
@rma-bryson

Copy link
Copy Markdown
Collaborator Author

Swagger UI screenshots:

image image

@rma-bryson
rma-bryson requested a review from adamkorynta August 20, 2026 20:56
Comment thread cwms-data-api/src/main/java/cwms/cda/api/v2/ForecastSpecControllerV2.java Outdated
@rma-bryson
rma-bryson force-pushed the bugfix/CDA-98-forecast-spec-updates branch from 27516cd to 011be32 Compare August 20, 2026 23:45
@rma-bryson
rma-bryson force-pushed the bugfix/CDA-98-forecast-spec-updates branch from 011be32 to 8c3d3b8 Compare August 20, 2026 23:53
@rma-bryson
rma-bryson requested a review from adamkorynta August 21, 2026 15:54
+ "spec id of the forecast spec whose data is to be deleted."),
},
queryParams = {
@OpenApiParam(name = OFFICE, required = true, description = "Specifies the "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we take the opportunity of the v2 to move office into a path param?

/v2/<office>/forecast/<name>
or
/v2/forecast/<office>/<name>

We started doing this on some other endpoints

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed:

Office filtering is not supported on the primary resource identified by the endpoint path, as the office context is already established by the route. If multi-office is needed (which I don't believe is often the case), then subsequent requests for each office can be made. Office-based filters are only supported for related resources and are expressed as query parameters, but not on the primary resource.

Example:

/v2/SWT/forecast-spec

Example of filtering on related resource:

/v2/SWT/location-group?category-office=CWMS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating Forecast Spec with same id-designator doesn't overwrite location

3 participants