Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While working with the TS recent method in cwmsjs I found an issue with the annotations.
I.e. (Note if this change is brought in this will need to be regenerated on the generator)
https://hydrologicengineeringcenter.github.io/cwms-data-api-client-javascript/classes/TimeSeriesApi.html#getTimeSeriesRecent.getTimeSeriesRecent-1
This fixes the OpenAPI response schema for
GET /timeseries/recent.The controller returns and formats
List<RecentValue>, but the OpenAPI annotation documented the200JSON response asTsv[]. That caused generated clients to map the endpoint to the wrong model and drop the useful recent-value payload fields such asidanddqu.This updates the annotation to use
RecentValue[]and adds a regression test to confirm the documented response type stays aligned with the controller behavior.Validation
Added a unit test asserting
TimeSeriesRecentController.handledocuments the200response asRecentValue.Attempted to run:
.\gradlew.bat :cwms-data-api:test --tests cwms.cda.api.TimeSeriesControllerTestLocal validation is currently blocked on Java 21 by a pre-existing compile issue in
TimeSeriesDaoImpl.java, where unqualifiedRecordis ambiguous betweenorg.jooq.Recordandjava.lang.Record.The PR CI currently runs on Java 11, where that ambiguity does not occur. Asked about possibly testing CI PR for java 21 as well.
Checklist