-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapting ratio endpoint processing #27
Conversation
de4d1e4
to
09b20b1
Compare
09b20b1
to
ae33581
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs some unit tests to check if the behaviour for empty filters is correct. While testing I discovered that an empty filter2
with a share ratio request does not work because the API internally converts such a query to something like (<filter1>) or ()
(see screenshot below), which is not a valid filter syntax.
You found this behavior with a /share request? The resource "/share" is not supported anymore since the release 1.0 from what I know. edit: Ok I think you've used /ratio :D |
Ok I could reproduce it. Working on it now. |
sorry, I meant it happens in a
|
identified issues have been resolved, will review again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have preferred if the filter2
parameter was not optional for ratio requests, so that users don't by mistake send complex, long-running queries if they just alter an existing /count/
query to a /count/share/
one without thinking to add the filter2
parameter (I know I would probably often make this mistake). It would still be possible to leave the filter2
parameter empty to do the "compare against all OSM data" use case. But if you prefer it this way @FabiKo117 I am willing to accept it as is.
Ahh yeah I get that point. If someone is just playing around with the endpoints using the same set of parameters, defining filter2 as being non-optional for /ratio would avoid that issue with requesting too much data unintentionally. We can switch that restriction yes. |
in all /ratio processings
if given filter param is null or empty - throws 400 BadRequestException only used in /ratio requests
that still used types-keys-values parameters in ElementsRequestExecutor
making combined filter empty if filter2 is empty adding a test
6da01e0
to
7e349c5
Compare
filter param can be null or empty (needs an adaption in the ohsome-filter library as well) - done with PR upgrade filter library to version 1.2 #38
filter2 param has to be defined - throws exception if param is null or empty
marking types-keys-values code handling /ratio requests as deprecated
needs issue Unfitting response for missing filter2 parameter #28 to be fixed