-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
discussion-pointSomething to talk about but take no action yetSomething to talk about but take no action yetdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
When going about learning a new endpoint I find myself going between the tests, what I think something should be, and guesswork/error responses.
If possible can we start placing (or go back) and place the test examples like this one:
cwms-data-api/cwms-data-api/src/test/java/cwms/cda/api/TextTimeSeriesControllerTestIT.java
Line 159 in 5fd3d7e
| InputStream resource = this.getClass().getResourceAsStream("/cwms/cda/api/spk/text_ts_create_reg.json"); |
and its contents:
https://github.com/USACE/cwms-data-api/blob/develop/cwms-data-api/src/test/resources/cwms/cda/api/spk/text_ts_create_reg.json
That would go a long way in giving users an idea on how something might work. (Especially POST bodies)
Things I ran into just trying to run this endpoint were
- Realizing it should actually be a valid TSID (whoops)
- Making sure the time I set for it matches the interval I provided
- Realizing what all is actually required vs what the example provided
This way the tests also test every input as well (instead of doing the minimum)
Thought of this when trying to figure out
Metadata
Metadata
Assignees
Labels
discussion-pointSomething to talk about but take no action yetSomething to talk about but take no action yetdocumentationImprovements or additions to documentationImprovements or additions to documentation