-
Notifications
You must be signed in to change notification settings - Fork 322
Allow empty query params for V3 filtering & Fix build for Windows #1124
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
Conversation
Hi, thanks so much for the PR. A couple of questions.
Thanks |
I was looking at #1 a little more and my thought would be to modify the FilterParameter annotation such that it has a property like "boolean allowEmpty". FilterBuilder is processing the annotations so it should be able to grab that metadata & use it. The benefit with this approach is that you could at the property level indicate which values are allowed to be empty. You could retain the existing behavior for everything except the property where you need to allow this. |
Hello, Regarding the first point, I agree with you. The boolean flag in the As for the second point, when I was building with maven (with jdk 8), it failed on |
Upon further inspection, I found out that all query filter params that allow for multiple values (all that are plural, e.g. |
@dmikusa-pivotal What do you think? |
Sorry, I got pulled away to a different issue.
Looks good to me.
OK, perfect. I think that fits with what you submitted in the PR. I'll go ahead and merge this. |
When creating a V3 request with an empty string as a list element, it is ignored and the filter is not applied to the CC API request.
e.g.:
The CC API allows filtering with empty strings, so it makes sense that the Java client should too.
e.g.:
The request
<cf-api>/v3/routes?space_guids=<guid>&paths=
is validThis PR adds support for filtering with empty strings.
It also fixes building on Windows, as some tests were not platform-agnostic and/or broken for Windows.