Closed caspervdw closed 3 years ago
I believe your reasoning is valid. Having different response types only makes is harder to parse the response, although the provider block gives you a clue as to what type of response you are dealing with. I believe splitting the endpoints would indeed be much cleaner.
The same suggestion was made by Deltares reviewers.
(During team discussion) Indeed create separate end point, because of the different response. Note: for now this leads to a json response according to the DD-API. In the future other formats might be supported (e.g. netcdf-CF)
In the description of the data endpoint there is the
Point[]
query parameter:I like to argue that (if we want this at all) this functionality should go into a different endpoint (like
coverages/{coverageId}/point-data
)This is mainly because the response types are different. What does the coverages/{coverageId}/point-data endpoint represent? An 2D raster or a list of 1D timeseries? It is in accordance to the REST principles to separate different objects into different endpoints.
A more concrete reason is that having query-parameter dependent response datatypes doesn't fit into the OAS3 scheme. Another issue is that "realization" is required only if "Point[]" is given.