-
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
addition of parameter ‘unclipped’ #29
Conversation
implementing processing and adding it to the logic adding it to the docs (swagger and sphinx) refactoring boolean parameter usage adding test
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.
looks good. small suggestion: maybe we should put a comment in the code that the old (undocumented) variant with properties=unclipped
is deprecated, so we don't forget to remove it in the next release(s). perhaps it's possible to use @Deprecated
for that?
I've tried this already, but can't find a proper position where to add the @deprecated annotation. Can you find one maybe? |
I believe it should be possible if one rewrites the whole statement slightly, like this: for (String property : properties) {
@Deprecated boolean oldUnclippedParameter = "unclipped".equalsIgnoreCase(property)
if ("tags".equalsIgnoreCase(property)) {
this.includeTags = true;
} else if ("metadata".equalsIgnoreCase(property)) {
this.includeOSMMetadata = true;
} else if (oldUnclippedParameter) {
this.unclipped = true;
} else {
throw new BadRequestException(ExceptionMessages.PROPERTIES_PARAM);
}
} |
aah, regarding my comment above #29 (comment), I realize now that it could result in double-negatives sometimes: |
that's a good point yes.. then it would be better to call it "clipGeometries" |
to better express the meaning and avoid confusion adapting the naming and conditions in the processing as well
implementing processing and adding it to the logic
adding it to the docs (swagger and sphinx)
refactoring boolean parameter usage
adding test
closes #20